Docker: Allow chosing which branch to build
Add an env var for this, default is still "master" Change-Id: If6ded3509efe9bf5bbb5a1d82b0aa2e66ac2c133 Reviewed-on: https://gerrit.libreoffice.org/65544 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
This commit is contained in:
parent
fb51909217
commit
f5fb312987
1 changed files with 8 additions and 2 deletions
|
@ -8,6 +8,7 @@
|
|||
# -- Available env vars --
|
||||
# * DOCKER_HUB_REPO - which Docker Hub repo to use
|
||||
# * DOCKER_HUB_TAG - which Docker Hub tag to create
|
||||
# * LIBREOFFICE_BRANCH - which branch to build (needs to exist in both core and online)
|
||||
|
||||
# check we can sudo without asking a pwd
|
||||
echo "Trying if sudo works without a password"
|
||||
|
@ -26,6 +27,11 @@ if [ -z "$DOCKER_HUB_TAG" ]; then
|
|||
fi;
|
||||
echo "Using Docker Hub Repository: '$DOCKER_HUB_REPO' with tag '$DOCKER_HUB_TAG'."
|
||||
|
||||
if [ -z "$LIBREOFFICE_BRANCH" ]; then
|
||||
LIBREOFFICE_BRANCH="master"
|
||||
fi;
|
||||
echo "Building branch '$LIBREOFFICE_BRANCH'"
|
||||
|
||||
# check if we have jake
|
||||
which jake || { cat << EOF
|
||||
|
||||
|
@ -53,7 +59,7 @@ if test ! -d libreoffice ; then
|
|||
git clone https://git.libreoffice.org/core libreoffice || exit 1
|
||||
fi
|
||||
|
||||
( cd libreoffice && git checkout master && ./g pull -r ) || exit 1
|
||||
( cd libreoffice && git checkout $LIBREOFFICE_BRANCH && ./g pull -r ) || exit 1
|
||||
|
||||
# online repo
|
||||
if test ! -d online ; then
|
||||
|
@ -61,7 +67,7 @@ if test ! -d online ; then
|
|||
( cd online && ./autogen.sh ) || exit 1
|
||||
fi
|
||||
|
||||
( cd online && git checkout -f master && git pull -r ) || exit 1
|
||||
( cd online && git checkout -f $LIBREOFFICE_BRANCH && git pull -r ) || exit 1
|
||||
|
||||
##### LibreOffice #####
|
||||
|
||||
|
|
Loading…
Reference in a new issue