From 17b1c8d338ac9f6b6bdef2cf32fd472212b515e9 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Thu, 29 Feb 2024 16:15:15 +0100 Subject: fix releases being a zip of a zip --- ci/upload_create_nightly.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) mode change 100644 => 100755 ci/upload_create_nightly.sh (limited to 'ci') diff --git a/ci/upload_create_nightly.sh b/ci/upload_create_nightly.sh old mode 100644 new mode 100755 index 754b9b87c..065cb13bf --- 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" -- cgit v1.2.3