Merge pull request #15 from YunoHost-Apps/testing

Testing | 3.2.37
This commit is contained in:
Salamandar 2024-06-20 23:27:59 +02:00 committed by GitHub
commit 3ea0844cb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 158 additions and 83 deletions

View file

@ -1,6 +1,7 @@
# All available README files by language # All available README files by language
- [Read the README in English](README.md) - [Read the README in English](README.md)
- [Lea el README en español](README_es.md)
- [Irakurri README euskaraz](README_eu.md) - [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md) - [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md) - [Le o README en galego](README_gl.md)

View file

@ -18,9 +18,9 @@ It shall NOT be edited by hand.
Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations. Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations.
**Shipped version:** 3.0~ynh4 **Shipped version:** 4.0.4~ynh1
**Demo:** <https://llk.github.io/scratch-gui/develop/> **Demo:** <https://scratch.mit.edu/projects/editor/?tutorial=getStarted>
## Screenshots ## Screenshots
@ -29,8 +29,8 @@ Scratch is a free programming language and online community where you can create
## Documentation and resources ## Documentation and resources
- Official app website: <https://scratch.mit.edu/> - Official app website: <https://scratch.mit.edu/>
- Official admin documentation: <https://fr.scratch-wiki.info/wiki/Scratch_3.0> - Official admin documentation: <https://scratch-wiki.info/wiki/Scratch_3.0>
- Upstream app code repository: <https://github.com/LLK/scratch-gui> - Upstream app code repository: <https://github.com/scratchfoundation/scratch-gui>
- YunoHost Store: <https://apps.yunohost.org/app/scratch> - YunoHost Store: <https://apps.yunohost.org/app/scratch>
- Report a bug: <https://github.com/YunoHost-Apps/scratch_ynh/issues> - Report a bug: <https://github.com/YunoHost-Apps/scratch_ynh/issues>

49
README_es.md Normal file
View file

@ -0,0 +1,49 @@
<!--
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
No se debe editar a mano.
-->
# Scratch para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/scratch.svg)](https://dash.yunohost.org/appci/app/scratch) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/scratch.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/scratch.maintain.svg)
[![Instalar Scratch con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=scratch)
*[Leer este README en otros idiomas.](./ALL_README.md)*
> *Este paquete le permite instalarScratch rapidamente y simplement en un servidor YunoHost.*
> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.*
## Descripción general
Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations.
**Versión actual:** 4.0.4~ynh1
**Demo:** <https://scratch.mit.edu/projects/editor/?tutorial=getStarted>
## Capturas
![Captura de Scratch](./doc/screenshots/800px-Scratch_3.0_Éditeur.png)
## Documentaciones y recursos
- Sitio web oficial: <https://scratch.mit.edu/>
- Documentación administrador oficial: <https://scratch-wiki.info/wiki/Scratch_3.0>
- Repositorio del código fuente oficial de la aplicación : <https://github.com/scratchfoundation/scratch-gui>
- Catálogo YunoHost: <https://apps.yunohost.org/app/scratch>
- Reportar un error: <https://github.com/YunoHost-Apps/scratch_ynh/issues>
## Información para desarrolladores
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/scratch_ynh/tree/testing
Para probar la rama `testing`, sigue asÍ:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/scratch_ynh/tree/testing --debug
o
sudo yunohost app upgrade scratch -u https://github.com/YunoHost-Apps/scratch_ynh/tree/testing --debug
```
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>

View file

@ -18,9 +18,9 @@ EZ editatu eskuz.
Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations. Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations.
**Paketatutako bertsioa:** 3.0~ynh4 **Paketatutako bertsioa:** 4.0.4~ynh1
**Demoa:** <https://llk.github.io/scratch-gui/develop/> **Demoa:** <https://scratch.mit.edu/projects/editor/?tutorial=getStarted>
## Pantaila-argazkiak ## Pantaila-argazkiak
@ -29,8 +29,8 @@ Scratch is a free programming language and online community where you can create
## Dokumentazioa eta baliabideak ## Dokumentazioa eta baliabideak
- Aplikazioaren webgune ofiziala: <https://scratch.mit.edu/> - Aplikazioaren webgune ofiziala: <https://scratch.mit.edu/>
- Administratzaileen dokumentazio ofiziala: <https://fr.scratch-wiki.info/wiki/Scratch_3.0> - Administratzaileen dokumentazio ofiziala: <https://scratch-wiki.info/wiki/Scratch_3.0>
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/LLK/scratch-gui> - Jatorrizko aplikazioaren kode-gordailua: <https://github.com/scratchfoundation/scratch-gui>
- YunoHost Denda: <https://apps.yunohost.org/app/scratch> - YunoHost Denda: <https://apps.yunohost.org/app/scratch>
- Eman errore baten berri: <https://github.com/YunoHost-Apps/scratch_ynh/issues> - Eman errore baten berri: <https://github.com/YunoHost-Apps/scratch_ynh/issues>

View file

@ -18,9 +18,9 @@ Il NE doit PAS être modifié à la main.
Scratch est un langage de programmation graphique manipulable et exécutable par le logiciel de même nom à vocation éducative. Ainsi, Scratch est à la fois un environnement de développement et un moteur dexécution du langage Scratch mais aussi un site web. Scratch est un langage de programmation graphique manipulable et exécutable par le logiciel de même nom à vocation éducative. Ainsi, Scratch est à la fois un environnement de développement et un moteur dexécution du langage Scratch mais aussi un site web.
**Version incluse:** 3.0~ynh4 **Version incluse:** 4.0.4~ynh1
**Démo:** <https://llk.github.io/scratch-gui/develop/> **Démo:** <https://scratch.mit.edu/projects/editor/?tutorial=getStarted>
## Captures décran ## Captures décran
@ -29,8 +29,8 @@ Scratch est un langage de programmation graphique manipulable et exécutable par
## Documentations et ressources ## Documentations et ressources
- Site officiel de lapp: <https://scratch.mit.edu/> - Site officiel de lapp: <https://scratch.mit.edu/>
- Documentation officielle de ladmin: <https://fr.scratch-wiki.info/wiki/Scratch_3.0> - Documentation officielle de ladmin: <https://scratch-wiki.info/wiki/Scratch_3.0>
- Dépôt de code officiel de lapp: <https://github.com/LLK/scratch-gui> - Dépôt de code officiel de lapp: <https://github.com/scratchfoundation/scratch-gui>
- YunoHost Store: <https://apps.yunohost.org/app/scratch> - YunoHost Store: <https://apps.yunohost.org/app/scratch>
- Signaler un bug: <https://github.com/YunoHost-Apps/scratch_ynh/issues> - Signaler un bug: <https://github.com/YunoHost-Apps/scratch_ynh/issues>

View file

@ -18,9 +18,9 @@ NON debe editarse manualmente.
Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations. Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations.
**Versión proporcionada:** 3.0~ynh4 **Versión proporcionada:** 4.0.4~ynh1
**Demo:** <https://llk.github.io/scratch-gui/develop/> **Demo:** <https://scratch.mit.edu/projects/editor/?tutorial=getStarted>
## Capturas de pantalla ## Capturas de pantalla
@ -29,8 +29,8 @@ Scratch is a free programming language and online community where you can create
## Documentación e recursos ## Documentación e recursos
- Web oficial da app: <https://scratch.mit.edu/> - Web oficial da app: <https://scratch.mit.edu/>
- Documentación oficial para admin: <https://fr.scratch-wiki.info/wiki/Scratch_3.0> - Documentación oficial para admin: <https://scratch-wiki.info/wiki/Scratch_3.0>
- Repositorio de orixe do código: <https://github.com/LLK/scratch-gui> - Repositorio de orixe do código: <https://github.com/scratchfoundation/scratch-gui>
- Tenda YunoHost: <https://apps.yunohost.org/app/scratch> - Tenda YunoHost: <https://apps.yunohost.org/app/scratch>
- Informar dun problema: <https://github.com/YunoHost-Apps/scratch_ynh/issues> - Informar dun problema: <https://github.com/YunoHost-Apps/scratch_ynh/issues>

View file

@ -3,7 +3,7 @@
请勿手动编辑。 请勿手动编辑。
--> -->
# YunoHost 的 Scratch # YunoHost 的 Scratch
[![集成程度](https://dash.yunohost.org/integration/scratch.svg)](https://dash.yunohost.org/appci/app/scratch) ![工作状态](https://ci-apps.yunohost.org/ci/badges/scratch.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/scratch.maintain.svg) [![集成程度](https://dash.yunohost.org/integration/scratch.svg)](https://dash.yunohost.org/appci/app/scratch) ![工作状态](https://ci-apps.yunohost.org/ci/badges/scratch.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/scratch.maintain.svg)
@ -18,9 +18,9 @@
Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations. Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations.
**分发版本:** 3.0~ynh4 **分发版本:** 4.0.4~ynh1
**演示:** <https://llk.github.io/scratch-gui/develop/> **演示:** <https://scratch.mit.edu/projects/editor/?tutorial=getStarted>
## 截图 ## 截图
@ -29,8 +29,8 @@ Scratch is a free programming language and online community where you can create
## 文档与资源 ## 文档与资源
- 官方应用网站: <https://scratch.mit.edu/> - 官方应用网站: <https://scratch.mit.edu/>
- 官方管理文档: <https://fr.scratch-wiki.info/wiki/Scratch_3.0> - 官方管理文档: <https://scratch-wiki.info/wiki/Scratch_3.0>
- 上游应用代码库: <https://github.com/LLK/scratch-gui> - 上游应用代码库: <https://github.com/scratchfoundation/scratch-gui>
- YunoHost 商店: <https://apps.yunohost.org/app/scratch> - YunoHost 商店: <https://apps.yunohost.org/app/scratch>
- 报告 bug <https://github.com/YunoHost-Apps/scratch_ynh/issues> - 报告 bug <https://github.com/YunoHost-Apps/scratch_ynh/issues>

View file

@ -1,11 +1,5 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ { location __PATH__/ {
# Path to source alias __INSTALL_DIR__/www/;
alias __INSTALL_DIR__/ ;
index index.html;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
} }

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,23 +7,26 @@ 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 = "3.0~ynh4" version = "4.0.4~ynh1"
maintainers = [] maintainers = []
[upstream] [upstream]
license = "BSD-3-Clause" license = "BSD-3-Clause"
website = "https://scratch.mit.edu/" website = "https://scratch.mit.edu/"
demo = "https://llk.github.io/scratch-gui/develop/" demo = "https://scratch.mit.edu/projects/editor/?tutorial=getStarted"
admindoc = "https://fr.scratch-wiki.info/wiki/Scratch_3.0" admindoc = "https://scratch-wiki.info/wiki/Scratch_3.0"
code = "https://github.com/LLK/scratch-gui" code = "https://github.com/scratchfoundation/scratch-gui"
[integration] [integration]
yunohost = ">= 11.1.21" yunohost = ">= 11.2"
architectures = "all" architectures = "all"
multi_instance = true multi_instance = true
ldap = false ldap = false
sso = false sso = false
disk = "50M" disk = "50M"
ram.build = "50M" ram.build = "50M"
ram.runtime = "50M" ram.runtime = "50M"
@ -39,9 +44,10 @@ ram.runtime = "50M"
default = "visitors" default = "visitors"
[resources] [resources]
[resources.sources.main] [resources.sources.main]
url = "https://github.com/YunoHost-Apps/scratch_ynh/releases/download/3.0-beta/scratch.zip" url = "https://github.com/scratchfoundation/scratch-gui/archive/refs/tags/v4.0.4.tar.gz"
sha256 = "61aedce5a9f02534ca57e08b24eaedd9c5bb8077c1541211ca7688e277f3979f" sha256 = "04910a021c104ac2cedf71b224ea13253ea582a829d20fc7fab75eae0e7cbb2e"
autoupdate.strategy = "latest_github_tag"
[resources.system_user] [resources.system_user]
@ -49,3 +55,5 @@ ram.runtime = "50M"
[resources.permissions] [resources.permissions]
main.url = "/" main.url = "/"
[resources.ports]

View file

@ -4,6 +4,9 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
# NodeJS version
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
#================================================= #=================================================
@ -22,9 +20,10 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir" ynh_backup --src_path="$install_dir"
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
# Backup the nginx configuration
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================

View file

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

View file

@ -9,21 +9,44 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers 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 # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Setting up source files..." --weight=5 ynh_script_progression --message="Setting up source files..." --weight=5
# 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="$install_dir" ynh_setup_source --dest_dir="$install_dir/sources"
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"
#================================================= #=================================================
# NGINX CONFIGURATION # Build
#================================================= #=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=2 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
#=================================================
ynh_script_progression --message="Adding 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

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -10,13 +8,14 @@ source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
ynh_remove_nodejs
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -10,15 +8,6 @@
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
#================================================= #=================================================
@ -27,12 +16,19 @@ 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"
#================================================= #=================================================
# GENERIC FINALIZATION # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================
# RELOAD NGINX AND PHP-FPM 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"
#=================================================
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_script_progression --message="Reloading NGINX web server..." --weight=1

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -9,31 +7,38 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=5
if [ "$upgrade_type" == "UPGRADE_APP" ] # Download, check integrity, uncompress and patch the source from app.src
then ynh_setup_source --dest_dir="$install_dir/sources" --full_replace=1
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"
fi
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"
#================================================= #=================================================
# NGINX CONFIGURATION # Build
#================================================= #=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 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
#=================================================
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