mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
no more update_src_version
This commit is contained in:
parent
8474ebbc5f
commit
cd0f3902ff
3 changed files with 20 additions and 29 deletions
|
@ -166,7 +166,6 @@ ynh_store_file_checksum --file="$config_path/gitlab.rb"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setting up source files..." --weight=200
|
||||
|
||||
update_src_version() {
|
||||
source ./upgrade.d/upgrade.last.sh
|
||||
cp ../conf/$architecture.src.default ../conf/$architecture.src
|
||||
ynh_replace_string --match_string="__VERSION__" --replace_string="$gitlab_version" --target_file="../conf/$architecture.src"
|
||||
|
@ -177,16 +176,14 @@ update_src_version() {
|
|||
elif [ $architecture = "arm" ]; then
|
||||
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_arm_source_sha256" --target_file="../conf/$architecture.src"
|
||||
fi
|
||||
}
|
||||
|
||||
update_src_version
|
||||
|
||||
tempdir="$(mktemp -d)"
|
||||
|
||||
ynh_setup_source --dest_dir=$tempdir --source_id=$architecture
|
||||
|
||||
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 0 ]; then
|
||||
if ! ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename ; then # This command will fail in lxc env
|
||||
if ! ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename ;
|
||||
then # This command will fail in lxc env
|
||||
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"
|
||||
ynh_exec_warn_less dpkg --configure gitlab-ce
|
||||
fi
|
||||
|
|
|
@ -97,28 +97,25 @@ ynh_restore_file --origin_path="$config_path/gitlab-persistent.rb"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling gitlab..." --weight=200
|
||||
|
||||
update_src_version() {
|
||||
source ../settings/scripts/upgrade.d/upgrade.last.sh
|
||||
mkdir -p ../conf/
|
||||
cp ../settings/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"
|
||||
source ../settings/scripts/upgrade.d/upgrade.last.sh
|
||||
mkdir -p ../conf/
|
||||
cp ../settings/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"
|
||||
|
||||
if [ $architecture = "x86-64" ]; then
|
||||
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_x86_64_source_sha256" --target_file="../conf/$architecture.src"
|
||||
elif [ $architecture = "arm" ]; then
|
||||
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_arm_source_sha256" --target_file="../conf/$architecture.src"
|
||||
fi
|
||||
}
|
||||
|
||||
update_src_version
|
||||
if [ $architecture = "x86-64" ]; then
|
||||
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_x86_64_source_sha256" --target_file="../conf/$architecture.src"
|
||||
elif [ $architecture = "arm" ]; then
|
||||
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_arm_source_sha256" --target_file="../conf/$architecture.src"
|
||||
fi
|
||||
|
||||
tempdir="$(mktemp -d)"
|
||||
|
||||
ynh_setup_source --dest_dir=$tempdir --source_id=$architecture
|
||||
|
||||
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 0 ]; then
|
||||
if ! ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename ; then # This command will fail in lxc env
|
||||
if ! ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename ;
|
||||
then # This command will fail in lxc env
|
||||
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"
|
||||
ynh_exec_warn_less dpkg --configure gitlab-ce
|
||||
fi
|
||||
|
|
|
@ -231,7 +231,10 @@ chown admin: "$config_path/gitlab-persistent.rb"
|
|||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
||||
update_src_version() {
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Setting up source files..." --weight=200
|
||||
|
||||
source ./upgrade.d/upgrade.last.sh
|
||||
cp ../conf/$architecture.src.default ../conf/$architecture.src
|
||||
ynh_replace_string --match_string="__VERSION__" --replace_string="$gitlab_version" --target_file="../conf/$architecture.src"
|
||||
|
@ -242,20 +245,14 @@ update_src_version() {
|
|||
elif [ $architecture = "arm" ]; then
|
||||
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_arm_source_sha256" --target_file="../conf/$architecture.src"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Setting up source files..." --weight=200
|
||||
|
||||
update_src_version
|
||||
|
||||
tempdir="$(mktemp -d)"
|
||||
|
||||
ynh_setup_source --dest_dir=$tempdir --source_id=$architecture
|
||||
|
||||
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 0 ]; then
|
||||
if ! ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename ; then # This command will fail in lxc env
|
||||
if ! ynh_exec_warn_less dpkg -i $tempdir/$gitlab_filename ;
|
||||
then # This command will fail in lxc env
|
||||
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"
|
||||
ynh_exec_warn_less dpkg --configure gitlab-ce
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue