mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
Upgrade to 12.0.x before upgrading to a newer version
This commit is contained in:
parent
bbcee7b0ca
commit
b94a18c170
3 changed files with 22 additions and 4 deletions
|
@ -254,9 +254,8 @@ then
|
|||
current_major_version=$(($current_major_version + 1))
|
||||
fi
|
||||
|
||||
# If the current version has the same major version than the next one,
|
||||
# then it's the last upgrade to do
|
||||
if [ "$last_major_version" -eq "$current_major_version" ]; then
|
||||
# Finish with the last migration if the file doesn't exist
|
||||
if [ ! -e "./upgrade.d/upgrade.$current_major_version.sh" ]; then
|
||||
current_major_version=last
|
||||
fi
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ gitlab_filename="gitlab-ce-${gitlab_version}.deb"
|
|||
|
||||
# Action to do in case of failure of the package_check
|
||||
package_check_action() {
|
||||
ynh_replace_string --match_string="command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"" --replace_string="command \"cat \/etc\/sysctl.conf\"" --target_file="$final_path/embedded/cookbooks/package/resources/sysctl.rb"
|
||||
local sysctl_file="$final_path/embedded/cookbooks/package/resources/sysctl.rb"
|
||||
ynh_replace_string --match_string="command \"sysctl -e \(.*\)\"" --replace_string="command \"sysctl -e \1 || true\"" --target_file=$sysctl_file
|
||||
}
|
||||
|
||||
|
|
18
scripts/upgrade.d/upgrade.12.sh
Normal file
18
scripts/upgrade.d/upgrade.12.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
# It's required to upgrade to the latest 12.0.x version before to another 12.X verion.
|
||||
gitlab_version="12.0.12"
|
||||
|
||||
# There is no buster version for gitlab 12.0.X
|
||||
gitlab_x86_64_debian_version="stretch"
|
||||
|
||||
gitlab_x86_64_source_sha256="e80cda4c328c2627278a3d74dbdd53420e1fec9ecbeaeb5d4dcb4773726e5904"
|
||||
|
||||
gitlab_arm_source_sha256="a0862e3c31b61d9274a55b7307d15daa5258473ccb97b8ae0d807f7474c971df"
|
||||
|
||||
gitlab_filename="gitlab-ce-${gitlab_version}.deb"
|
||||
|
||||
# Action to do in case of failure of the package_check
|
||||
package_check_action() {
|
||||
local sysctl_file="$final_path/embedded/cookbooks/package/resources/sysctl.rb"
|
||||
ynh_replace_string --match_string="command \"sysctl -e \(.*\)\"" --replace_string="command \"sysctl -e \1 || true\"" --target_file=$sysctl_file
|
||||
}
|
||||
|
Loading…
Reference in a new issue