summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhackademix2018-10-13 23:07:52 +0200
committerhackademix2018-10-14 23:18:31 +0200
commitae5704dcf9983ad29cd96333e857a4ff5d762e3d (patch)
tree9f17328683651d1794fd605bec2ed7416ef6c80f
parente3dc784cd497be8b6d9d916a63e26f1929fd5b82 (diff)
downloadnoscript-ae5704dcf9983ad29cd96333e857a4ff5d762e3d.tar.gz
noscript-ae5704dcf9983ad29cd96333e857a4ff5d762e3d.tar.xz
noscript-ae5704dcf9983ad29cd96333e857a4ff5d762e3d.zip
[Build] Improved bash support.
-rw-r--r--build.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index 4707a87..0e25017 100644
--- a/build.sh
+++ b/build.sh
@@ -11,14 +11,15 @@ if [ "$1" == "tag" ]; then
git tag -a "$VER" && git push origin "$VER"
exit 0
fi
-if [ "$1" == "rel" ]; then
+if [[ "$1" == "rel" ]]; then
perl -pi.bak -e 's/("version":.*)rc\d+/$1/' "$MANIFEST_IN"
rm -f "$MANIFEST_IN".bak
"$0" && "$0" bump
exit
fi
-if [ "$1" == "bump" ]; then
- if [ "$2" ]; then
+
+if [[ "$1" == "bump" ]]; then
+ if [[ "$2" ]]; then
NEW_VER="$2"
if [[ "$2" == *.* ]]; then # full dotted version number
pattern='"\d+.*?'
@@ -64,13 +65,13 @@ BUILD_OPTS="build"
if [[ $VER == *rc* ]]; then
sed -re 's/^(\s+)"strict_min_version":.*$/\1"update_url": "https:\/\/secure.informaction.com\/update\/?v='$VER'",\n\0/' \
"$MANIFEST_IN" > "$MANIFEST_OUT"
- if [ "$1" == "sign" ]; then
+ if [[ "$1" == "sign" ]]; then
BUILD_CMD="$BASE/../../we-sign"
BUILD_OPTS=""
fi
else
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."
fi
fi