1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/vore_ynh.git synced 2024-09-03 20:36:07 +02:00

Update upgrade

This commit is contained in:
Éric Gaspar 2023-05-15 15:04:02 +02:00
parent ae02a86a9c
commit a08ffb9ed7

View file

@ -19,21 +19,25 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
#================================================= #=================================================
# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) # BUILD APP
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Building app..." --weight=1
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_exec_warn_less ynh_install_go --go_version=$go_version
ynh_use_go
# Download, check integrity, uncompress and patch the source from app.src pushd $install_dir
ynh_setup_source --dest_dir="$install_dir" git pull https://git.j3s.sh/vore "$install_dir" --quiet
ynh_add_config --template="../conf/index.tmpl.html" --destination="$install_dir/files/index.tmpl.html"
ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/
popd
chown -R $app:www-data "$install_dir"
chmod +x "$install_dir/vore"
fi fi
chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # REAPPLY SYSTEM CONFIGURATIONS
#================================================= #=================================================