From 30e75c6d31fc6df1f3c4a5ea74c6b8e056aa91ae Mon Sep 17 00:00:00 2001 From: Ethan White Date: Sun, 23 Jul 2017 12:02:21 -0400 Subject: [PATCH] Make release using valid json Properly balancing json and bash's quoting requirements with variables is a little tricky. Escaping the "s instead of using ' appears to be the solution. --- update_repo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update_repo.sh b/update_repo.sh index c367d166c5..6c7697c1e4 100644 --- a/update_repo.sh +++ b/update_repo.sh @@ -14,5 +14,5 @@ if [ "$last_commit_date" != "$current_date" ]; then # Create a new release to trigger automated Zenodo archiving git tag $current_date git push --quiet deploy --tags > /dev/null 2>&1 - curl -v -i -X POST -H "Content-Type:application/json" -H "Authorization: token $GITHUB_RELEASE_TOKEN" https://api.github.com/repos/weecology/portalPredictions/releases -d "{'tag_name':$current_date}" + curl -v -i -X POST -H "Content-Type:application/json" -H "Authorization: token $GITHUB_RELEASE_TOKEN" https://api.github.com/repos/weecology/portalPredictions/releases -d "{\"tag_name\":\"$current_date\"}" fi