Make the release script compatible with both mac and linux
Curse you BSD and GNU sed being so different! Test Plan: - Run `sed -i.bak -e 's|boo|blah|' blah` on both a linux and mac computer @kevinb
This commit is contained in:
parent
4d2e46e7f6
commit
4327e85796
14
release.sh
14
release.sh
|
@ -35,9 +35,12 @@ git checkout --detach
|
|||
make setup dist
|
||||
git add dist/
|
||||
|
||||
# Edit package.json and bower.json to the right version
|
||||
sed -i "" -E 's|"version": "[^"]+",|"version": "'$VERSION'",|' package.json
|
||||
sed -i "" -E 's|"version": "[^"]+",|"version": "'$VERSION'",|' bower.json
|
||||
# Edit package.json and bower.json to the right version (see
|
||||
# http://stackoverflow.com/a/22084103 for why we need the .bak file to make
|
||||
# this mac & linux compatible)
|
||||
sed -i.bak 's|"version": "[^"]+",|"version": "'$VERSION'",|' package.json
|
||||
sed -i.bak -E 's|"version": "[^"]+",|"version": "'$VERSION'",|' bower.json
|
||||
rm -f package.json.bak bower.json.bak
|
||||
|
||||
# Make the commit and tag, and push them.
|
||||
git add package.json bower.json
|
||||
|
@ -53,8 +56,9 @@ if [ ! -z "$NEXT_VERSION" ]; then
|
|||
git checkout master
|
||||
|
||||
# Edit package.json and bower.json to the right version
|
||||
sed -i "" -E 's|"version": "[^"]+",|"version": "'$NEXT_VERSION'-pre",|' package.json
|
||||
sed -i "" -E 's|"version": "[^"]+",|"version": "'$NEXT_VERSION'-pre",|' bower.json
|
||||
sed -i.bak -e 's|"version": "[^"]+",|"version": "'$NEXT_VERSION'-pre",|' package.json
|
||||
sed -i.bak -e 's|"version": "[^"]+",|"version": "'$NEXT_VERSION'-pre",|' bower.json
|
||||
rm -f package.json.bak bower.json.bak
|
||||
|
||||
git add package.json bower.json
|
||||
git commit -n -m "Bump master to v$NEXT_VERSION-pre"
|
||||
|
|
Loading…
Reference in New Issue
Block a user