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}"