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:
parent
7c9c2c35f8
commit
1c15133a52
@ -141,7 +141,9 @@ echo "Available Branches:"
|
|||||||
echo "- master branch (stable updates) | default, recommended [1]"
|
echo "- master branch (stable updates) | default, recommended [1]"
|
||||||
echo "- nightly branch (unstable updates, testing) | not-production ready [2]"
|
echo "- nightly branch (unstable updates, testing) | not-production ready [2]"
|
||||||
sleep 1
|
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
|
case $branch in
|
||||||
[2])
|
[2])
|
||||||
git_branch="nightly"
|
git_branch="nightly"
|
||||||
@ -150,6 +152,11 @@ read -r -p "Choose the Branch with it´s number [1/2] " branch
|
|||||||
git_branch="master"
|
git_branch="master"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -z "${MAILCOW_BRANCH}" ]; then
|
||||||
|
git_branch=${MAILCOW_BRANCH}
|
||||||
|
fi
|
||||||
|
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git checkout -f $git_branch
|
git checkout -f $git_branch
|
||||||
|
Loading…
Reference in New Issue
Block a user