From 09624c45a8b35fcc9b3abaacc100ae2f2748e34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Borbo=C3=ABn?= <ponsfrilus@gmail.com> Date: Fri, 30 Aug 2019 18:17:08 +0200 Subject: [PATCH] Bug fixes - No /dev/stderr? Shame - jq --raw doesn't exist --- deploy.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 1ffdd64..2185eb2 100755 --- a/deploy.sh +++ b/deploy.sh @@ -37,8 +37,10 @@ git remote set-url origin "git@gitlab.epfl.ch:idevelop/howtogitlabrunner.git" git push -f --tags echo "END OF PUSH" +stderr=/proc/self/fd/2 + echo "BEGIN UPLOAD" -UPLOADED_FILE_URL="$(curl --request POST --header "Private-Token: ${MY_TOKEN}" --form "file=@README.pdf" "https://gitlab.epfl.ch/api/v4/projects/$PROJECT_ID/uploads" | tee /dev/stderr | jq --raw .url)" +UPLOADED_FILE_URL="$(curl --request POST --header "Private-Token: ${MY_TOKEN}" --form "file=@README.pdf" "https://gitlab.epfl.ch/api/v4/projects/$PROJECT_ID/uploads" | tee $stderr | jq -r .url)" echo "END UPLOAD" echo "BEGIN POST RELEASE" @@ -48,7 +50,7 @@ for retry in $(seq 1 5); do --header "Private-Token: ${MY_TOKEN}" \ --data '{"name": "New README release", "tag_name": "'${RELEASE_V}'", "description": "Release with the PDF [README.pdf]('${UPLOADED_FILE_URL}')"}' \ "https://gitlab.epfl.ch/api/v4/projects/'${PROJECT_ID}'/releases" \ - | tee /dev/stderr | jq -e ".created_at" + | tee $stderr | jq -e ".created_at" then break else -- GitLab