aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Boniface <joshua@boniface.me>2019-08-31 21:32:11 -0400
committerJoshua Boniface <joshua@boniface.me>2019-08-31 21:38:26 -0400
commit5251a5ca795611bac403e652144e61d391ecea49 (patch)
treee60e1f715dbf231e3b96d1297f17bde105e374a8
parentba06ef57a9b265608cc9cdd8e681fed7d2231d4d (diff)
Allow selecting web branch and fix Docker sed
-rwxr-xr-xbump_version8
1 files changed, 6 insertions, 2 deletions
diff --git a/bump_version b/bump_version
index 398caee15..590020864 100755
--- a/bump_version
+++ b/bump_version
@@ -24,7 +24,11 @@ fi
shared_version_file="./SharedVersion.cs"
build_file="./build.yaml"
-web_branch="$( git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' )"
+if [[ -z $2 ]]; then
+ web_branch="$( git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' )"
+else
+ web_branch="$2"
+fi
# Initialize submodules
git submodule update --init --recursive
@@ -80,7 +84,7 @@ fi
# Set the Dockerfile web version to the specified new_version
old_version="$(
grep "JELLYFIN_WEB_VERSION=" Dockerfile \
- | sed -E 's/ARG JELLYFIN_WEB_VERSION=([0-9\.]+[-a-z0-9]*)/\1/'
+ | sed -E 's/ARG JELLYFIN_WEB_VERSION=v([0-9\.]+[-a-z0-9]*)/\1/'
)"
echo $old_version