diff --git a/manifest.toml b/manifest.toml index d7abe34..662e0e2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -45,9 +45,9 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/scratchfoundation/scratch-gui/archive/refs/tags/v4.1.3.tar.gz" - sha256 = "77283288fa9a8bbad9a02099d6bfc9180244d23ae7011e4c4b97953c509705ac" - autoupdate.strategy = "latest_github_tag" + url = "https://jo.trax.im/api/packages/julianfoad/generic/scratch-gui-dist/4.1.3/scratch-gui-dist-4.1.3.tar.gz" + sha256 = "54a520f30b204c7829f932c1413cbaff956f197411d14190cf721e527d7e854a" + #autoupdate.strategy = "..." [resources.system_user] diff --git a/scripts/_common.sh b/scripts/_common.sh index 8bf600d..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,6 @@ # COMMON VARIABLES #================================================= -# NodeJS version -nodejs_version=18 - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 5e93dee..ebb02dd 100644 --- a/scripts/install +++ b/scripts/install @@ -12,9 +12,6 @@ source /usr/share/yunohost/helpers #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing nodejs..." --weight=50 - -ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -22,7 +19,7 @@ ynh_install_nodejs --nodejs_version=$nodejs_version ynh_script_progression --message="Setting up source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir/sources" +ynh_setup_source --dest_dir="$install_dir/www" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" @@ -30,18 +27,6 @@ chown -R "$app:www-data" "$install_dir" #================================================= # Build #================================================= -ynh_script_progression --message="Installing $app..." --weight=40 - -pushd "$install_dir/sources" - ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" install - ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" BUILD_MODE=dist "$ynh_npm" run build -popd - -mv "$install_dir/sources/build" "$install_dir/www" -ynh_secure_remove --file="$install_dir/sources" - -chown -R "$app:www-data" "$install_dir" #================================================= # SYSTEM CONFIGURATION diff --git a/scripts/remove b/scripts/remove index 74aeff0..1bc5685 100644 --- a/scripts/remove +++ b/scripts/remove @@ -14,8 +14,6 @@ ynh_script_progression --message="Removing system configurations related to $app ynh_remove_nginx_config -ynh_remove_nodejs - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 19e60b4..d1a98de 100644 --- a/scripts/restore +++ b/scripts/restore @@ -23,8 +23,6 @@ chown -R "$app:www-data" "$install_dir" #================================================= ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 -ynh_install_nodejs --nodejs_version="$nodejs_version" - ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 86ca9c2..de22006 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,5 +1,7 @@ #!/bin/bash +#================================================= +# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -10,9 +12,6 @@ source /usr/share/yunohost/helpers #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing nodejs..." - -ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -20,7 +19,7 @@ ynh_install_nodejs --nodejs_version=$nodejs_version ynh_script_progression --message="Upgrading source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir/sources" --full_replace=1 +ynh_setup_source --dest_dir="$install_dir/www" --full_replace=1 chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" @@ -28,19 +27,6 @@ chown -R "$app:www-data" "$install_dir" #================================================= # Build #================================================= -ynh_script_progression --message="Installing $app..." --weight=40 - -pushd "$install_dir/sources" - ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" install - ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" BUILD_MODE=dist "$ynh_npm" run build -popd - -ynh_secure_remove --file="$install_dir/www" -mv "$install_dir/sources/build" "$install_dir/www" -ynh_secure_remove --file="$install_dir/sources" - -chown -R "$app:www-data" "$install_dir" #================================================= # REAPPLY SYSTEM CONFIGURATIONS