[Build] Improved bash support.
This commit is contained in:
parent
e3dc784cd4
commit
ae5704dcf9
11
build.sh
11
build.sh
|
@ -11,14 +11,15 @@ if [ "$1" == "tag" ]; then
|
||||||
git tag -a "$VER" && git push origin "$VER"
|
git tag -a "$VER" && git push origin "$VER"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [ "$1" == "rel" ]; then
|
if [[ "$1" == "rel" ]]; then
|
||||||
perl -pi.bak -e 's/("version":.*)rc\d+/$1/' "$MANIFEST_IN"
|
perl -pi.bak -e 's/("version":.*)rc\d+/$1/' "$MANIFEST_IN"
|
||||||
rm -f "$MANIFEST_IN".bak
|
rm -f "$MANIFEST_IN".bak
|
||||||
"$0" && "$0" bump
|
"$0" && "$0" bump
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if [ "$1" == "bump" ]; then
|
|
||||||
if [ "$2" ]; then
|
if [[ "$1" == "bump" ]]; then
|
||||||
|
if [[ "$2" ]]; then
|
||||||
NEW_VER="$2"
|
NEW_VER="$2"
|
||||||
if [[ "$2" == *.* ]]; then # full dotted version number
|
if [[ "$2" == *.* ]]; then # full dotted version number
|
||||||
pattern='"\d+.*?'
|
pattern='"\d+.*?'
|
||||||
|
@ -64,13 +65,13 @@ BUILD_OPTS="build"
|
||||||
if [[ $VER == *rc* ]]; then
|
if [[ $VER == *rc* ]]; then
|
||||||
sed -re 's/^(\s+)"strict_min_version":.*$/\1"update_url": "https:\/\/secure.informaction.com\/update\/?v='$VER'",\n\0/' \
|
sed -re 's/^(\s+)"strict_min_version":.*$/\1"update_url": "https:\/\/secure.informaction.com\/update\/?v='$VER'",\n\0/' \
|
||||||
"$MANIFEST_IN" > "$MANIFEST_OUT"
|
"$MANIFEST_IN" > "$MANIFEST_OUT"
|
||||||
if [ "$1" == "sign" ]; then
|
if [[ "$1" == "sign" ]]; then
|
||||||
BUILD_CMD="$BASE/../../we-sign"
|
BUILD_CMD="$BASE/../../we-sign"
|
||||||
BUILD_OPTS=""
|
BUILD_OPTS=""
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
grep -v '"update_url":' "$MANIFEST_IN" > "$MANIFEST_OUT"
|
grep -v '"update_url":' "$MANIFEST_IN" > "$MANIFEST_OUT"
|
||||||
if [ "$1" == "sign" ]; then
|
if [[ "$1" == "sign" ]]; then
|
||||||
echo >&2 "WARNING: won't auto-sign a release version, please manually upload to AMO."
|
echo >&2 "WARNING: won't auto-sign a release version, please manually upload to AMO."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue