Allow selecting web branch and fix Docker sed

This commit is contained in:
Joshua Boniface 2019-08-31 21:32:11 -04:00
parent ba06ef57a9
commit 5251a5ca79

View File

@ -24,7 +24,11 @@ fi
shared_version_file="./SharedVersion.cs" shared_version_file="./SharedVersion.cs"
build_file="./build.yaml" 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 # Initialize submodules
git submodule update --init --recursive git submodule update --init --recursive
@ -80,7 +84,7 @@ fi
# Set the Dockerfile web version to the specified new_version # Set the Dockerfile web version to the specified new_version
old_version="$( old_version="$(
grep "JELLYFIN_WEB_VERSION=" Dockerfile \ 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 echo $old_version