Skip to content

Commit

Permalink
Merge pull request #114 from YunoHost-Apps/simplify-upgrade
Browse files Browse the repository at this point in the history
simplify upgrade script
  • Loading branch information
kay0u committed May 31, 2020
2 parents b1a3ac3 + a1ea2ba commit 9cb1211
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/upgrade
Expand Up @@ -259,6 +259,9 @@ then
source ./upgrade.d/upgrade.$current_major_version.first.sh
elif [ -e "./upgrade.d/upgrade.$current_major_version.last.sh" ]; then
source ./upgrade.d/upgrade.$current_major_version.last.sh
# Finish with the last migration if the file doesn't exist
else
source ./upgrade.d/upgrade.last.sh
fi
}

Expand Down Expand Up @@ -290,11 +293,6 @@ then
fi
fi

# Finish with the last migration if the file doesn't exist
if [ ! -e "./upgrade.d/upgrade.$current_major_version.first.sh" ] && [ ! -e "./upgrade.d/upgrade.$current_major_version.last.sh" ]; then
source ./upgrade.d/upgrade.last.sh
fi

cp ../conf/$architecture.src.default ../conf/$architecture.src
ynh_replace_string --match_string="__VERSION__" --replace_string="$gitlab_version" --target_file="../conf/$architecture.src"
ynh_replace_string --match_string="__SOURCE_FILENAME__" --replace_string="$gitlab_filename" --target_file="../conf/$architecture.src"
Expand Down

0 comments on commit 9cb1211

Please sign in to comment.