Fix quoting and escaping in release script.

This commit is contained in:
Dan Helfman 2018-10-14 12:14:29 -07:00
parent 067ed27689
commit 531d5c80c0

View file

@ -27,8 +27,8 @@ twine upload -r pypi dist/borgmatic-*.tar.gz
twine upload -r pypi dist/borgmatic-*-py3-none-any.whl
# Set release changelogs on projects.evoworx.org and GitHub.
release_changelog=$(sed '/^$/q' NEWS |grep '^\s*\*')
escaped_release_changelog=$(echo $release_changelog | sed -z 's/\n/\\n/g')
release_changelog="$(cat NEWS | sed '/^$/q' | grep -v '^\S')"
escaped_release_changelog="$(echo "$release_changelog" | sed -z 's/\n/\\n/g' | sed -z 's/\"/\\"/g')"
curl --request POST \
"https://projects.torsion.org/api/v1/repos/witten/borgmatic/releases?access_token=$projects_token" \
--header "Accept: application/json" \