1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

simplify upgrade script

This commit is contained in:
Kay0u 2020-05-30 17:07:36 +02:00
parent b1a3ac3c6d
commit a1ea2bac5d
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D

View file

@ -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
}
@ -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"