summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhackademix2020-03-16 19:11:54 +0100
committerhackademix2020-03-16 19:11:54 +0100
commit00b34159168a02d4fcdc9ad519003081c972d731 (patch)
tree8ea8fee1d095b4ee80abecb908015d3002fd47dd
parenta7e8e768d8ada4b590b2bd3cce7745a23e55ad56 (diff)
downloadnoscript-00b34159168a02d4fcdc9ad519003081c972d731.tar.gz
noscript-00b34159168a02d4fcdc9ad519003081c972d731.tar.xz
noscript-00b34159168a02d4fcdc9ad519003081c972d731.zip
Support synonims for "release".
-rw-r--r--build.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 13936de..daef9dc 100644
--- a/build.sh
+++ b/build.sh
@@ -8,7 +8,7 @@ MANIFEST_OUT="$BUILD/manifest.json"
strip_rc_ver() {
MANIFEST="$1"
- if [ "$2" = "rel" ]; then
+ if [[ "$2" == "rel" ]]; then
replace='s/("version":.*)rc\d+/$1/'
else
replace='s/("version":.*)(\d+)rc(\d+)/{$1 . ($2 == "0" ? "0" : ($2-1) . ".9" . sprintf("%03d", $3))}/e'
@@ -22,7 +22,7 @@ if [ "$1" == "tag" ]; then
git tag -a "$VER" && git push origin "$VER"
exit 0
fi
-if [[ "$1" == "rel" ]]; then
+if [[ "$1" =~ ^r(el(ease)?)?$ ]]; then
strip_rc_ver "$MANIFEST_IN" rel
"$0" && "$0" bump
exit