1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-11-28 08:52:00 +02:00

Modified branch switch in generate_config.sh

Added possibility to define the mailcow branch by an environment variable to be able to bypass input.
This commit is contained in:
Malte Jesgarzewsky 2022-09-02 19:22:48 +02:00 committed by GitHub
parent 7c9c2c35f8
commit 1c15133a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,7 +141,9 @@ echo "Available Branches:"
echo "- master branch (stable updates) | default, recommended [1]"
echo "- nightly branch (unstable updates, testing) | not-production ready [2]"
sleep 1
read -r -p "Choose the Branch with it´s number [1/2] " branch
while [ -z "${MAILCOW_BRANCH}" ]; do
read -r -p "Choose the Branch with it´s number [1/2] " branch
case $branch in
[2])
git_branch="nightly"
@ -150,6 +152,11 @@ read -r -p "Choose the Branch with it´s number [1/2] " branch
git_branch="master"
;;
esac
done
if [ ! -z "${MAILCOW_BRANCH}" ]; then
git_branch=${MAILCOW_BRANCH}
fi
git fetch --all
git checkout -f $git_branch
@ -458,4 +465,4 @@ else
echo ' $MAILCOW_UPDATEDAT='$(date +%s)';' >> data/web/inc/app_info.inc.php
echo '?>' >> data/web/inc/app_info.inc.php
echo -e "\e[33mCannot determine current git repository version...\e[0m"
fi
fi