release-proxmoxve 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. set -ex
  3. cd $(dirname $0)/..
  4. touch .make-proxmoxve
  5. source ./scripts/version
  6. ./scripts/release-build
  7. touch dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
  8. chmod 755 dist/publish.sh dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
  9. if [ "$OS_AUTOFORMAT" = "true" ]; then
  10. echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/latest/proxmoxve/rancheros-autoformat.iso" >> ./dist/publish_gss_latest.sh
  11. echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/${VERSION}/proxmoxve/rancheros-autoformat.iso" >> ./dist/publish_gss_${VERSION}.sh
  12. echo "github-release upload --user rancher --repo os --tag ${VERSION} --file dist/artifacts/rancheros.iso --name rancheros-proxmoxve-autoformat.iso" > dist/publish.sh
  13. exit 0
  14. fi
  15. for file in $(ls dist/artifacts/); do
  16. case $file in
  17. "initrd-"*)
  18. echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/proxmoxve/initrd" >> ./dist/publish_gss_latest.sh
  19. echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/proxmoxve/initrd" >> ./dist/publish_gss_${VERSION}.sh
  20. ;;
  21. "rancheros.iso" | "rootfs.tar.gz")
  22. echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/proxmoxve/${file}" >> ./dist/publish_gss_latest.sh
  23. echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/proxmoxve/${file}" >> ./dist/publish_gss_${VERSION}.sh
  24. ;;
  25. esac
  26. done
  27. echo "github-release upload --user rancher --repo os --tag ${VERSION} --file dist/artifacts/rancheros.iso --name rancheros-proxmoxve.iso" > dist/publish.sh