2018-12-05 04:03:04 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
|
2018-12-12 08:39:02 +00:00
|
|
|
touch .make-hyperv
|
|
|
|
|
2018-12-05 04:03:04 +00:00
|
|
|
source ./scripts/version
|
|
|
|
./scripts/release-build
|
|
|
|
|
|
|
|
touch dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
|
|
|
chmod 755 dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
|
|
|
|
|
|
|
|
for file in $(ls dist/artifacts/); do
|
|
|
|
case $file in
|
|
|
|
"initrd-"*)
|
|
|
|
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/hyperv/initrd" >> ./dist/publish_gss_latest.sh
|
|
|
|
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/hyperv/initrd" >> ./dist/publish_gss_${VERSION}.sh
|
|
|
|
;;
|
|
|
|
"rancheros.iso" | "rootfs.tar.gz")
|
|
|
|
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/hyperv/${file}" >> ./dist/publish_gss_latest.sh
|
|
|
|
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/hyperv/${file}" >> ./dist/publish_gss_${VERSION}.sh
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|