From aa3428d54ba20c3261671e319ea4912822286867 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 12 Nov 2016 11:42:27 +0000 Subject: [PATCH] Upgrade from development branch --- src/freedombone-upgrade | 28 +++++++++++++++++++--------- src/freedombone-utils-upgrade | 2 +- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/freedombone-upgrade b/src/freedombone-upgrade index 2b45cf1b..4efba674 100755 --- a/src/freedombone-upgrade +++ b/src/freedombone-upgrade @@ -41,13 +41,26 @@ FRIENDS_MIRRORS_SERVER= FRIENDS_MIRRORS_SSH_PORT=2222 FRIENDS_MIRRORS_PASSWORD= MY_MIRRORS_PASSWORD= +CURRENT_BRANCH=master UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-* for f in $UTILS_FILES do source $f done + read_config_param PROJECT_REPO +read_config_param DEVELOPMENT_BRANCH + +# TODO change this after release +DEVELOPMENT_BRANCH=stockholm +write_config_param "DEVELOPMENT_BRANCH" "$DEVELOPMENT_BRANCH" + +if [ $DEVELOPMENT_BRANCH ]; then + if [ ${#DEVELOPMENT_BRANCH} -gt 0 ]; then + CURRENT_BRANCH=$DEVELOPMENT_BRANCH + fi +fi update-ca-certificates @@ -55,21 +68,18 @@ read_repo_servers ${PROJECT_NAME}-mirrors if [ ! -d $PROJECT_DIR ]; then - # TODO after stockholm merge change this to git_clone - git clone $PROJECT_REPO $PROJECT_DIR + git_clone $PROJECT_REPO $PROJECT_DIR fi if [ -d $PROJECT_DIR ]; then if [ -f $CONFIGURATION_FILE ]; then cd $PROJECT_DIR rm -rf $PROJECT_DIR/locale/* - git merge --abort - git stash - # TODO after stockholm merge change this to git_pull - git checkout master - git pull $PROJECT_REPO - git checkout stockholm - git pull $PROJECT_REPO origin/stockholm + if [[ "$CURRENT_BRANCH" == *"master" ]]; then + git_pull $PROJECT_REPO + else + git_pull $PROJECT_REPO origin/$DEVELOPMENT_BRANCH + fi make install ${PROJECT_NAME} -c $CONFIGURATION_FILE fi diff --git a/src/freedombone-utils-upgrade b/src/freedombone-utils-upgrade index 5aa6db85..513b387c 100755 --- a/src/freedombone-utils-upgrade +++ b/src/freedombone-utils-upgrade @@ -55,7 +55,7 @@ function upgrade_installation_from_previous_versions { return fi - # upgrade from previous versions to stockholm + # upgrade from previous versions sed -i 's|configure_email|install_email|g' $COMPLETION_FILE sed -i 's|install_dlna_server|install_dlna|g' $COMPLETION_FILE sed -i 's|install_gnu_social_theme|install_gnusocial_theme|g' $COMPLETION_FILE