Skip to content

Commit

Permalink
createRelease.sh: added error checking in modify_files()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
muxator committed May 3, 2018
1 parent ba32201 commit 903a2c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/createRelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 903a2c8

Please sign in to comment.