1
0
Fork 0
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:
Kay0u 2020-05-02 01:44:36 +02:00
parent bbcee7b0ca
commit b94a18c170
No known key found for this signature in database
GPG key ID: AE1DCADB6415A156
3 changed files with 22 additions and 4 deletions

View file

@ -254,9 +254,8 @@ then
current_major_version=$(($current_major_version + 1)) current_major_version=$(($current_major_version + 1))
fi fi
# If the current version has the same major version than the next one, # Finish with the last migration if the file doesn't exist
# then it's the last upgrade to do if [ ! -e "./upgrade.d/upgrade.$current_major_version.sh" ]; then
if [ "$last_major_version" -eq "$current_major_version" ]; then
current_major_version=last current_major_version=last
fi fi

View file

@ -11,6 +11,7 @@ gitlab_filename="gitlab-ce-${gitlab_version}.deb"
# Action to do in case of failure of the package_check # Action to do in case of failure of the package_check
package_check_action() { 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
} }

View 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
}