Exports don't persist between commands
Some checks reported errors
continuous-integration/drone/push Build encountered an error

- Exports don't persist between commands in Drone commands - removed these exports and made more verbose commands.
This commit is contained in:
Kieron Morris 2025-03-09 21:45:29 +00:00
parent 5e6e6c394a
commit 2906b8724b

View File

@ -37,25 +37,10 @@ steps:
from_secret: gitea_token from_secret: gitea_token
commands: commands:
- apk add --no-cache curl - apk add --no-cache curl
- export BUILD_VERSION=$(git rev-parse --short HEAD)
- export ISO_NAME="Asuro-${BUILD_VERSION}.iso"
- ls -lah
- chmod +w Asuro.iso - chmod +w Asuro.iso
- cp Asuro.iso "$ISO_NAME" - cp Asuro.iso "Asuro-$(git rev-parse --short HEAD).iso"
- echo "Uploading Asuro-$(git rev-parse --short HEAD).iso to Gitea Packages..."
# Upload commit-specific ISO - 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"
- | - echo "Updating latest ISO reference..."
echo "Uploading ${ISO_NAME} to Gitea Packages..." - 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/${BUILD_VERSION}/Asuro.iso" \ - 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"
-H "Authorization: token $GITEA_TOKEN" \
--upload-file $ISO_NAME
# Update the "latest" alias (delete old latest, re-upload)
- |
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 POST "https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso" \
-H "Authorization: token $GITEA_TOKEN" \
--upload-file $ISO_NAME