mirror of
https://github.com/YunoHost-Apps/immich_ynh.git
synced 2024-09-03 20:36:24 +02:00
We actually don't really care about the update_type because we might want to *always* rebuild the app.
This commit is contained in:
parent
4180e2fc3b
commit
d0b76fc53f
1 changed files with 22 additions and 33 deletions
|
@ -6,11 +6,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
@ -26,38 +21,32 @@ ynh_systemd_action --service_name="$app-machine-learning" --action="stop"
|
|||
#ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
#=================================================
|
||||
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
tmpdir="$(mktemp --directory)"
|
||||
ynh_setup_source --source_id="main" --dest_dir="$tmpdir"
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
tmpdir="$(mktemp --directory)"
|
||||
ynh_setup_source --source_id="main" --dest_dir="$tmpdir"
|
||||
|
||||
#=================================================
|
||||
# CHECK PYTHON VERSION AND COMPILE IF NEEDED
|
||||
#=================================================
|
||||
ynh_script_progression --message="Check Python version & compile the required one if needed..." --weight=1
|
||||
py_required_major=$(cat "$tmpdir/machine-learning/Dockerfile" | grep "FROM python:" | head -n1 | cut -d':' -f2 | cut -d'-' -f1)
|
||||
myynh_py_latest_from_major --python="$py_required_major"
|
||||
myynh_install_python --python="$py_required_version"
|
||||
#=================================================
|
||||
# CHECK PYTHON VERSION AND COMPILE IF NEEDED
|
||||
#=================================================
|
||||
ynh_script_progression --message="Check Python version & compile the required one if needed..." --weight=1
|
||||
py_required_major=$(cat "$tmpdir/machine-learning/Dockerfile" | grep "FROM python:" | head -n1 | cut -d':' -f2 | cut -d'-' -f1)
|
||||
myynh_py_latest_from_major --python="$py_required_major"
|
||||
myynh_install_python --python="$py_required_version"
|
||||
|
||||
#=================================================
|
||||
# INSTALL NODEJS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing nodejs..." --weight=1
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version"
|
||||
#=================================================
|
||||
# INSTALL NODEJS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing nodejs..." --weight=1
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version"
|
||||
|
||||
#=================================================
|
||||
# MAKE INSTALL
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making install..." --weight=5
|
||||
ynh_secure_remove --file="$install_dir"
|
||||
myynh_install_immich
|
||||
fi
|
||||
#=================================================
|
||||
# MAKE INSTALL
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making install..." --weight=5
|
||||
ynh_secure_remove --file="$install_dir"
|
||||
myynh_install_immich
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
|
|
Loading…
Reference in a new issue