From 032be45f9f05750d129602c7b373b2ce13a34742 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Thu, 24 Oct 2024 22:25:21 +1300 Subject: [PATCH] =?UTF-8?q?fix:=20Create=20.zip=20archive=20instead=20of?= =?UTF-8?q?=20.tar.gz=20for=20Gitea=20=F0=9F=92=9A=F0=9F=91=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/build.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index f0783ed..9554f8e 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,14 +1,20 @@ #!/bin/bash -mkdir -p ./build/tmp +mkdir -p ./build/ echo "Made temporary directory" -# Package up the release -tar -czf "./build/ugly-queue-${1}.tar.gz" \ - --exclude='./vendor' \ - --exclude='./tests' \ - --exclude='./build' \ - . +# Package up the release (Needs to be .zip for upload to gitea) + +zip -r "./build/ugly-queue.zip" \ + . \ + -x './vendor/*' \ + -x './tests/*' \ + -x './build/*' \ + -x './.git/*' \ + -x './.idea/*' \ + -x './.github/*' \ + -x './scripts/*' + RELEASE_ID=$(curl --silent -X 'GET' "${GITEA_HOST}/api/v1/repos/cybercinch/ugly-queue/releases/latest" \ -H "accept: application/json" \ -H "Authorization: token ${GITEA_TOKEN}" | jq -r .id) @@ -19,7 +25,6 @@ curl --silent -X 'POST' "${GITEA_HOST}/api/v1/repos/cybercinch/ugly-queue/releas --form attachment="@build/ugly-queue-${1}.tar.gz" # Upload the artifact to composer registry - curl --user "cibot:${GITEA_TOKEN}" \ - --upload-file "build/ugly-queue-${1}.tar.gz" \ - "${GITEA_HOST}/api/packages/cibot/composer?version=${1}" + --upload-file "build/ugly-queue.zip" \ + "${GITEA_HOST}/api/packages/cybercinch/composer?version=${1}"