From ae5704dcf9983ad29cd96333e857a4ff5d762e3d Mon Sep 17 00:00:00 2001 From: hackademix Date: Sat, 13 Oct 2018 23:07:52 +0200 Subject: [Build] Improved bash support. --- build.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'build.sh') 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 -- cgit v1.2.3