Skip to content
Snippets Groups Projects
Commit 903a2c8e authored by muxator's avatar muxator
Browse files

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
parent ba322012
No related branches found
No related tags found
No related merge requests found
...@@ -66,8 +66,11 @@ function check_api_token { ...@@ -66,8 +66,11 @@ function check_api_token {
function modify_files { function modify_files {
# Add changelog text to first line of CHANGELOG.md # Add changelog text to first line of CHANGELOG.md
sed -i "1s/^/${changelogText}\n/" 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 # Replace version number of etherpad in package.json
sed -i -r "s/(\"version\"[ ]*: \").*(\")/\1$VERSION\2/" src/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 { function create_release_branch {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment