createRelease.sh: added error checking in modify_files()

Otherwise, when inserting a multiline changelog sed would with this message:
  sed: -e expression #1, char 27: unterminated `s' command

And the script would continue with an unmodified CHANGELOG.md
For simmetry, added the same check to package.json, too
pull/3064/head
muxator 2018-05-03 23:54:08 +02:00
parent ba322012d7
commit 903a2c8e43
1 changed files with 3 additions and 0 deletions

View File

@ -66,8 +66,11 @@ function check_api_token {
function modify_files {
# Add changelog text to first line of CHANGELOG.md
sed -i "1s/^/${changelogText}\n/" CHANGELOG.md
[[ $? != 0 ]] && echo "Aborting: Error modifying CHANGELOG.md" && exit 1
# Replace version number of etherpad in package.json
sed -i -r "s/(\"version\"[ ]*: \").*(\")/\1$VERSION\2/" src/package.json
[[ $? != 0 ]] && echo "Aborting: Error modifying package.json" && exit 1
}
function create_release_branch {