From 4f380debb5a1b4e0079dde717ed3c6a455629b43 Mon Sep 17 00:00:00 2001 From: DerLinkman Date: Tue, 23 Aug 2022 11:38:06 +0200 Subject: [PATCH] Added branch switch in generate_config.sh --- generate_config.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/generate_config.sh b/generate_config.sh index 33a7b1e1..1ae76b21 100755 --- a/generate_config.sh +++ b/generate_config.sh @@ -135,6 +135,25 @@ else SKIP_SOLR=n fi +echo "Which branch of mailcow do you want to use?" +echo "" +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 + case $branch in + [2]) + git_branch="nightly" + ;; + *) + git_branch="master" + ;; + esac + +git fetch --all +git checkout -f $git_branch + [ ! -f ./data/conf/rspamd/override.d/worker-controller-password.inc ] && echo '# Placeholder' > ./data/conf/rspamd/override.d/worker-controller-password.inc cat << EOF > mailcow.conf @@ -413,4 +432,4 @@ else echo ' $MAILCOW_GIT_URL="";' >> 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 \ No newline at end of file