From d1a4b4d42f5f7ffec09b74bb31146663c972f962 Mon Sep 17 00:00:00 2001 From: Kieron Morris Date: Sun, 9 Mar 2025 21:57:19 +0000 Subject: [PATCH] Another attempt - issues with YAML layout for some reason --- .drone.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index cf941a82..baae6808 100644 --- a/.drone.yml +++ b/.drone.yml @@ -38,9 +38,10 @@ steps: commands: - apk add --no-cache curl - chmod +w Asuro.iso - - cp Asuro.iso "Asuro-$(git rev-parse --short HEAD).iso" - - echo "Uploading Asuro-$(git rev-parse --short HEAD).iso to Gitea Packages..." - - curl -X PUT "https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/$(git rev-parse --short HEAD)/Asuro.iso" -H "Authorization: token $GITEA_TOKEN" --upload-file "Asuro-$(git rev-parse --short HEAD).iso" + - git rev-parse --short HEAD > commit_hash.txt + - COMMIT_HASH=$(cat commit_hash.txt) && cp Asuro.iso "Asuro-${COMMIT_HASH}.iso" + - COMMIT_HASH=$(cat commit_hash.txt) && echo "Uploading Asuro-${COMMIT_HASH}.iso to Gitea Packages..." + - COMMIT_HASH=$(cat commit_hash.txt) && curl -X PUT "https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/${COMMIT_HASH}/Asuro.iso" -H "Authorization: token $GITEA_TOKEN" --upload-file "Asuro-${COMMIT_HASH}.iso" - echo "Updating latest ISO reference..." - - curl -X DELETE "https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso" -H "Authorization: token $GITEA_TOKEN" || echo "No previous latest version found." - - curl -X PUT "https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso" -H "Authorization: token $GITEA_TOKEN" --upload-file "Asuro-$(git rev-parse --short HEAD).iso" \ No newline at end of file + - curl -X DELETE https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso -H "Authorization: token $GITEA_TOKEN" || echo "No previous latest version found." + - COMMIT_HASH=$(cat commit_hash.txt) && curl -X PUT https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso -H "Authorization: token $GITEA_TOKEN" --upload-file "Asuro-${COMMIT_HASH}.iso" \ No newline at end of file