image_builder: fix bug with GH credentials after parsing json

Signed-off-by: Artem Smirnov <urpylka@gmail.com>
This commit is contained in:
urpylka
2018-04-24 22:06:27 +03:00
parent 460761ef68
commit 7f7276e34a

View File

@@ -101,9 +101,9 @@ publish_image() {
echo 'Post message to GH'
local NEW_RELEASE_BODY="### Download\n* [$2.zip]($IMAGE_LINK) ($IMAGE_SIZE)\n\n$6"
local DATA="{ \"body\":\"$NEW_RELEASE_BODY\" }"
local GH_LOGIN=$(cat $4 | jq '.github.login')
local GH_PASS=$(cat $4 | jq '.github.password')
local GH_URL=$(cat $4 | jq '.github.url')
local GH_LOGIN=$(cat $4 | jq '.github.login' -r)
local GH_PASS=$(cat $4 | jq '.github.password' -r)
local GH_URL=$(cat $4 | jq '.github.url' -r)
curl -d "$(echo $DATA)" -u "$GH_LOGIN:$GH_PASS" --request PATCH $GH_URL$5
}