diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-02-29 16:15:15 +0100 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-02-29 17:00:20 +0100 |
| commit | 17b1c8d338ac9f6b6bdef2cf32fd472212b515e9 (patch) | |
| tree | bae7eed2def5ceff3b04aafde19f4763ca57aeec /ci | |
| parent | ee543a304a12716495397211a91e3fe1aebee713 (diff) | |
fix releases being a zip of a zip
Diffstat (limited to 'ci')
| -rwxr-xr-x[-rw-r--r--] | ci/upload_create_nightly.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ci/upload_create_nightly.sh b/ci/upload_create_nightly.sh index 754b9b87c..065cb13bf 100644..100755 --- a/ci/upload_create_nightly.sh +++ b/ci/upload_create_nightly.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + bucket=$1 platform=$2 artifact=$3 @@ -9,5 +11,15 @@ filename="odin-$platform-nightly+$now.zip" echo "Creating archive $filename from $artifact and uploading to $bucket" -7z a -bd "output/$filename" -r "$artifact" -b2 upload-file --noProgress "$bucket" "output/$filename" "nightly/$filename"
\ No newline at end of file +# If this is already zipped up (done before artifact upload to keep permissions in tact), just move it. +if [ "${artifact: -4}" == ".zip" ] +then + echo "Artifact already a zip" + mkdir -p "output" + mv "$artifact" "output/$filename" +else + echo "Artifact needs to be zipped" + 7z a -bd "output/$filename" -r "$artifact" +fi + +b2 upload-file --noProgress "$bucket" "output/$filename" "nightly/$filename" |