1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/uptime-kuma_ynh.git synced 2024-10-01 13:34:58 +02:00

use ynh_setup_source also for front end

This commit is contained in:
Hadrien 2021-11-02 08:19:03 +03:00
parent 804379d875
commit 8539138446
2 changed files with 10 additions and 4 deletions

7
conf/dist.src Normal file
View file

@ -0,0 +1,7 @@
SOURCE_URL=https://github.com/louislam/uptime-kuma/releases/download/1.10.0/dist.tar.gz
SOURCE_SUM=f9f41507b427f155cb6a9bbc136ebba87587fd51c6d11e1999e5a66cc4249e6e
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=dist.tar.gz
SOURCE_EXTRACT=true

View file

@ -166,7 +166,9 @@ ynh_script_progression --message="Setting up source files..." --time --weight=1
ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" ynh_setup_source --dest_dir="$final_path" --keep=data/
# Download, check integrity, uncompress and patch the source from dist.src
ynh_setup_source --source_id="dist" --dest_dir="$final_path/dist"
# FIXME: this should be managed by the core in the future # FIXME: this should be managed by the core in the future
# Here, as a packager, you may have to tweak the ownerhsip/permissions # Here, as a packager, you may have to tweak the ownerhsip/permissions
@ -212,9 +214,6 @@ ynh_add_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Installing Uptime Kuma dependencies..." --time --weight=7 ynh_script_progression --message="Installing Uptime Kuma dependencies..." --time --weight=7
cd $final_path && ynh_exec_warn_less $ynh_npm install cd $final_path && ynh_exec_warn_less $ynh_npm install
ynh_script_progression --message="Downloading Uptime Kuma frontend..." --time --weight=1
ynh_exec_warn_less wget https://github.com/louislam/uptime-kuma/releases/download/1.10.0/dist.tar.gz
ynh_exec_as $app tar -xvf dist.tar.gz --directory=$final_path
#================================================= #=================================================
# CREATE DATA DIRECTORY # CREATE DATA DIRECTORY