Loading .gitlab-ci.yml +6 −4 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ create-release: cat > data.json << EOF { "tag_name": "$CI_COMMIT_TAG", "ref": "$CI_COMMIT_TAG", "assets": { "links": [ { Loading @@ -89,8 +90,9 @@ create-release: } } EOF - cat data.json - compressed_json=$(jq -c . data.json) - echo $compressed_json - | curl --header 'Content-Type: application/json' --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \ --request POST https://gitlab.e.foundation/api/v4/projects/$PROJECT_ID/releases \ --data $(printf "'%s'" $(jq -c . data.json | sed 's/"/\\"/g')) No newline at end of file curl --data "$compressed_json" \ --header 'Content-Type: application/json' --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \ --request POST https://gitlab.e.foundation/api/v4/projects/$PROJECT_ID/releases No newline at end of file Loading
.gitlab-ci.yml +6 −4 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ create-release: cat > data.json << EOF { "tag_name": "$CI_COMMIT_TAG", "ref": "$CI_COMMIT_TAG", "assets": { "links": [ { Loading @@ -89,8 +90,9 @@ create-release: } } EOF - cat data.json - compressed_json=$(jq -c . data.json) - echo $compressed_json - | curl --header 'Content-Type: application/json' --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \ --request POST https://gitlab.e.foundation/api/v4/projects/$PROJECT_ID/releases \ --data $(printf "'%s'" $(jq -c . data.json | sed 's/"/\\"/g')) No newline at end of file curl --data "$compressed_json" \ --header 'Content-Type: application/json' --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \ --request POST https://gitlab.e.foundation/api/v4/projects/$PROJECT_ID/releases No newline at end of file