From 97c5360dabbe5437ec6fe44f584a6dc4559fbbbe Mon Sep 17 00:00:00 2001 From: WinterMyst <22961076-wintermyst@users.noreply.gitlab.com> Date: Sat, 21 Sep 2024 23:48:59 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b213980..fc6ac70 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,13 +30,15 @@ release: - ssh-keyscan gitlab.com >> ~/.ssh/known_hosts script: # Check if VERSION is provided - - if [ -z "$VERSION" ]; then echo "Error: VERSION variable is required." && exit 1; fi + - | + if [ -z "$VERSION" ]; then echo "Error: VERSION variable is required." && exit 1; fi # Run Gulp release task (includes zipping) - gulp release # Create a release on GitLab - - export RELEASE_RESPONSE=$(curl --request POST \ + - | + export RELEASE_RESPONSE=$(curl --request POST \ --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \ --header "Content-Type: application/json" \ --data '{ @@ -58,7 +60,8 @@ release: - export RELEASE_URL=$(echo $RELEASE_RESPONSE | jq -r '.assets.links[0].url') # Update the system.json file with the release URL - - sed -i "s|\"download\":.*|\"download\": \"$RELEASE_URL\",|" system.json + - | + sed -i "s|\"download\":.*|\"download\": \"$RELEASE_URL\",|" system.json # Commit the updated system.json and push it to master - git config --global user.name "GitLab CI" @@ -68,7 +71,8 @@ release: - git push origin master # Publish the release to the Foundry API - - curl -X POST https://api.foundryvtt.com/_api/packages/release_version/ \ + - | + curl -X POST https://api.foundryvtt.com/_api/packages/release_version/ \ -H "Authorization: $FOUNDRY_API_KEY" \ -H "Content-Type: application/json" \ -d '{