mirror of
https://github.com/rancher/os.git
synced 2025-06-24 22:11:33 +00:00
30 lines
1.2 KiB
Plaintext
30 lines
1.2 KiB
Plaintext
|
#!/bin/bash
|
||
|
set -ex
|
||
|
|
||
|
cd $(dirname $0)/..
|
||
|
|
||
|
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
|
||
|
*"installer.tar" | "Dockerfile"*)
|
||
|
;;
|
||
|
"initrd-"*)
|
||
|
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/arm64/initrd" >> ./dist/publish_gss_latest.sh
|
||
|
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/arm64/initrd" >> ./dist/publish_gss_${VERSION}.sh
|
||
|
;;
|
||
|
"vmlinuz-"*)
|
||
|
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/arm64/vmlinuz" >> ./dist/publish_gss_latest.sh
|
||
|
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/arm64/vmlinuz" >> ./dist/publish_gss_${VERSION}.sh
|
||
|
;;
|
||
|
*)
|
||
|
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/arm64/${file}" >> ./dist/publish_gss_latest.sh
|
||
|
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/arm64/${file}" >> ./dist/publish_gss_${VERSION}.sh
|
||
|
;;
|
||
|
esac
|
||
|
done
|