Bump to v4.0.4, fix scripts

This commit is contained in:
Félix Piédallu 2024-06-20 20:50:26 +02:00
parent c6106eda50
commit a8f419564b
8 changed files with 37 additions and 40 deletions

View file

@ -1,3 +1,5 @@
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
packaging_format = 2 packaging_format = 2
id = "scratch" id = "scratch"
@ -5,7 +7,7 @@ name = "Scratch"
description.en = "Programming language to create your own interactive stories, games, and animations" description.en = "Programming language to create your own interactive stories, games, and animations"
description.fr = "Langage de programmation pour créer vos propres histoires, jeux et animations interactifs" description.fr = "Langage de programmation pour créer vos propres histoires, jeux et animations interactifs"
version = "4.0.1~ynh1" version = "4.0.4~ynh1"
maintainers = [] maintainers = []
@ -43,9 +45,9 @@ ram.runtime = "50M"
[resources] [resources]
[resources.sources.main] [resources.sources.main]
url = "https://github.com/scratchfoundation/scratch-gui/releases/download/v4.0.1/scratch-gui-4.0.1.tgz" url = "https://github.com/scratchfoundation/scratch-gui/archive/refs/tags/v4.0.4.tar.gz"
sha256 = "ad9a25110bc981d5aacb0bbb7816b822ec752ba9abc8a45c90a229c99c7a5913" sha256 = "04910a021c104ac2cedf71b224ea13253ea582a829d20fc7fab75eae0e7cbb2e"
autoupdate.strategy = "latest_github_release" autoupdate.strategy = "latest_github_tag"
[resources.system_user] [resources.system_user]
@ -55,4 +57,3 @@ ram.runtime = "50M"
main.url = "/" main.url = "/"
[resources.ports] [resources.ports]

View file

@ -5,7 +5,7 @@
#================================================= #=================================================
# NodeJS version # NodeJS version
nodejs_version=14 nodejs_version=18
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC STARTING
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================

View file

@ -25,7 +25,19 @@ ynh_script_progression --message="Setting up source files..." --weight=5
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R "$app:www-data" "$install_dir"
#=================================================
# Build
#=================================================
ynh_script_progression --message="Installing $app..." --weight=40
pushd "$install_dir"
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
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" BUILD_MODE=dist "$ynh_npm" link
popd
#================================================= #=================================================
# SYSTEM CONFIGURATION # SYSTEM CONFIGURATION
@ -37,24 +49,8 @@ ynh_add_nginx_config
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
yunohost service add "$app" --description="Language to create your own interactive stories" --log="/var/log/$app/$app.log" yunohost service add "$app" --description="Language to create your own interactive stories" --log="/var/log/$app/$app.log"
#=================================================
# INSTALL ETHERPAD
#=================================================
ynh_script_progression --message="Installing $app..." --weight=40
pushd "$install_dir"
ynh_use_nodejs
npm install
BUILD_MODE=dist npm run build
npm link
#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
#ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH BUILD_MODE=dist $ynh_npm link
popd
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================

View file

@ -16,7 +16,6 @@ ynh_script_progression --message="Removing system configurations related to $app
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) # Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status "$app" >/dev/null; then if ynh_exec_warn_less yunohost service status "$app" >/dev/null; then
ynh_script_progression --message="Removing $app service integration..." --weight=1
yunohost service remove "$app" yunohost service remove "$app"
fi fi

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -18,7 +16,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir" ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R "$app:www-data" "$install_dir"
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION
@ -31,7 +29,6 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable "$app.service" --quiet systemctl enable "$app.service" --quiet
yunohost service add "$app" --description="Language to create your own interactive stories" --log="/var/log/$app/$app.log" yunohost service add "$app" --description="Language to create your own interactive stories" --log="/var/log/$app/$app.log"
#================================================= #=================================================
@ -39,7 +36,6 @@ yunohost service add "$app" --description="Language to create your own interacti
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
### Typically you only have either $app or php-fpm but not both at the same time...
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -25,18 +23,29 @@ ynh_script_progression --message="Upgrading source files..." --weight=5
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R "$app:www-data" "$install_dir"
#================================================= #=================================================
# UPDATE A CONFIG FILE # Build
#================================================= #=================================================
ynh_script_progression --message="Updating $app's configuration files..." --weight=1 ynh_script_progression --message="Installing $app..." --weight=40
pushd "$install_dir"
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
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" BUILD_MODE=dist "$ynh_npm" link
popd
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
ynh_add_systemd_config ynh_add_systemd_config
yunohost service add "$app" --description="Language to create your own interactive stories" --log="/var/log/$app/$app.log" yunohost service add "$app" --description="Language to create your own interactive stories" --log="/var/log/$app/$app.log"
#================================================= #=================================================