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, toopull/3064/head
parent
ba322012d7
commit
903a2c8e43
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue