From 8539138446fde0a94db501c0fbd1536ec1cc4f55 Mon Sep 17 00:00:00 2001 From: Hadrien Date: Tue, 2 Nov 2021 08:19:03 +0300 Subject: [PATCH] use ynh_setup_source also for front end --- conf/dist.src | 7 +++++++ scripts/install | 7 +++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 conf/dist.src diff --git a/conf/dist.src b/conf/dist.src new file mode 100644 index 0000000..331766a --- /dev/null +++ b/conf/dist.src @@ -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 diff --git a/scripts/install b/scripts/install index 2f671e8..15ec1f4 100755 --- a/scripts/install +++ b/scripts/install @@ -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 # 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 # 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 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