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

Merge pull request #114 from YunoHost-Apps/simplify-upgrade

simplify upgrade script
This commit is contained in:
Kayou 2020-05-31 02:26:23 +02:00 committed by GitHub
commit 9cb12110c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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"