Просмотр исходного кода

Update default release branch for existing installations

Kristan Kenney 6 лет назад
Родитель
Сommit
c78fd59dfb
1 измененных файлов с 7 добавлено и 2 удалено
  1. 7 2
      install/upgrade/versions/1.0.1.sh

+ 7 - 2
install/upgrade/versions/1.0.1.sh

@@ -6,8 +6,6 @@ function version_ge(){ test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1
 # Set new version number
 NEW_VERSION="1.0.1"
 
-
-
 # Load hestia.conf
 source /usr/local/hestia/conf/hestia.conf
 
@@ -15,6 +13,13 @@ source /usr/local/hestia/conf/hestia.conf
 #######                          Place additional commands below.                                #######
 ########################################################################################################
 
+# Ensure that users from previous releases are set to the correct stable release branch
+if [ $RELEASE_BRANCH = "master" ] || [ $RELEASE_BRANCH = "develop" ]; then
+    echo "(*) Updating default release branch configuration..."
+    sed -i "/RELEASE_BRANCH/d" $HESTIA/conf/hestia.conf
+    echo "RELEASE_BRANCH='release'" >> $HESTIA/conf/hestia.conf
+fi
+
 # Add amd64 to repositories to prevent notifications - https://goo.gl/hmsSV7
 if ! grep -q 'arch=amd64' /etc/apt/sources.list.d/nginx.list; then
     sed -i s/"deb "/"deb [arch=amd64] "/g /etc/apt/sources.list.d/nginx.list