Skip to content

Commit 061b3f7

Browse files
committed
Properly escape shell script
1 parent db22e81 commit 061b3f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ node('digitalocean && ubuntu-16.04 && 8gb && android-7.0') {
6161
~/bin/repo manifest -r -o manifest.xml
6262
6363
curl --fail -X PUT -H "Authorization: token $GITHUB_TOKEN" \
64-
-d "{\"message\":\"Add $VERSION changes\", \"committer\":{\"name\":\"Jenkins\",\"email\":\"[email protected]\"},\"content\":\"$(echo "$CHANGES" | base64 -w 0)\"}" \
64+
-d "{\\"message\\":\\"Add $VERSION changes\\", \\"committer\\":{\\"name\\":\\"Jenkins\\",\\"email\\":\\"[email protected]\\"},\\"content\\":\\"$(echo "$CHANGES" | base64 -w 0)\\"}" \
6565
"https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/contents/versions/$VERSION/CHANGES.md"
6666
6767
curl --fail -X PUT -H "Authorization: token $GITHUB_TOKEN" \
68-
-d "{\"message\":\"Add $VERSION manifest\", \"committer\":{\"name\":\"Jenkins\",\"email\":\"[email protected]\"},\"content\":\"$(base64 -w 0 manifest.xml)\"}" \
68+
-d "{\\"message\\":\\"Add $VERSION manifest\\", \\"committer\\":{\\"name\\":\\"Jenkins\\",\\"email\\":\\"[email protected]\\"},\\"content\\":\\"$(base64 -w 0 manifest.xml)\\"}" \
6969
"https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/contents/versions/$VERSION/manifest.xml"
7070
'''
7171
}

0 commit comments

Comments
 (0)