travis release script - fix missing escape for backslash, refs #324

This commit is contained in:
Andreas Dangel
2017-05-05 11:34:08 +02:00
parent aba44a8824
commit 767eea8b4e

View File

@ -15,7 +15,7 @@ curl -H "Accept: application/json" -X PUT -d "default=windows&default=mac&defaul
RELEASE_ID=$(curl -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" https://api.github.com/repos/pmd/pmd/releases/tags/pmd_releases/${RELEASE_VERSION}|jq ".id")
RELEASE_NAME="PMD ${RELEASE_VERSION} ($(date -u +%d-%B-%Y))"
RELEASE_BODY=$(tail -n +3 src/site/markdown/overview/changelog.md) # skips the first 2 lines - the heading 'PMD Release Notes'
RELEASE_BODY="${RELEASE_BODY//$'\\'/\\\\}"
RELEASE_BODY="${RELEASE_BODY//'\'/\\\\}"
RELEASE_BODY="${RELEASE_BODY//$'\r'/}"
RELEASE_BODY="${RELEASE_BODY//$'\n'/\\r\\n}"
RELEASE_BODY="${RELEASE_BODY//'"'/\\\"}"