From 9ed571a75f0d7da11265ac50475c9cf91c883784 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 6 Jun 2024 08:28:30 +0000 Subject: [PATCH 1/8] Auto-update READMEs --- ALL_README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALL_README.md b/ALL_README.md index 8938aae..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,7 +1,7 @@ # All available README files by language - [Read the README in English](README.md) -- [Lee el README en español](README_es.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) From fb8f5b83f3317ac10cad98baefa6945a48aaef66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 6 Jun 2024 10:49:10 +0200 Subject: [PATCH 2/8] Apply template --- scripts/backup | 17 ++------- scripts/install | 59 ++++++++----------------------- scripts/remove | 54 +++++------------------------ scripts/restore | 75 +++++++++++----------------------------- scripts/upgrade | 92 ++++++++++++++----------------------------------- 5 files changed, 72 insertions(+), 225 deletions(-) diff --git a/scripts/backup b/scripts/backup index b88b274..b097ab9 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -10,7 +8,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= @@ -23,25 +20,17 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= - ynh_backup --src_path="/etc/logrotate.d/$app" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" +ynh_backup --src_path="/var/log/$app/" + #================================================= # BACKUP THE POSTGRESQL DATABASE #================================================= diff --git a/scripts/install b/scripts/install index bb65544..8229a35 100755 --- a/scripts/install +++ b/scripts/install @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -9,22 +7,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - - - -#================================================= -# STANDARD MODIFICATIONS -#================================================= - #================================================= # INSTALL DEPENDENCIES #================================================= ynh_script_progression --message="Installing dependencies... This might take some time." --weight=3 -ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +ynh_install_nodejs --nodejs_version="$NODEJS_VERSION" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -34,15 +22,9 @@ ynh_script_progression --message="Setting up source files..." --weight=3 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chown -R $app:www-data "$install_dir" - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=3 - -# Create a dedicated NGINX config -ynh_add_nginx_config +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # ADD A CONFIGURATION @@ -53,13 +35,9 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 redis_db=$(ynh_redis_get_free_db) ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" -ynh_add_config --template="../conf/default.yml" --destination="$install_dir/.config/default.yml" - -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +ynh_add_config --template="default.yml" --destination="$install_dir/.config/default.yml" chmod 400 "$install_dir/.config/default.yml" -chown $app:$app "$install_dir/.config/default.yml" +chown "$app:$app" "$install_dir/.config/default.yml" #================================================= # BUILD APP @@ -78,37 +56,28 @@ pushd "$install_dir" popd #================================================= -# SETUP SYSTEMD +# SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config - -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Configuring log rotation..." --weight=1 +yunohost service add "$app" --description="A interplanetary blogging platform" --log="/var/log/$app/$app.log" # Use logrotate to manage application logfile(s) ynh_use_logrotate -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="A interplanetary blogging platform" --log="/var/log/$app/$app.log" - #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 +ynh_script_progression --message="Starting $app's systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="All workers started" - +ynh_systemd_action --service_name="$app" --action="start" --log_path=systemd --line_match="All workers started" #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index 1164548..27813a7 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -9,51 +7,30 @@ source _common.sh source /usr/share/yunohost/helpers - #================================================= -# STANDARD REMOVE -#================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEM CONFIGURATIONS #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # 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 - ynh_script_progression --message="Removing $app service integration..." --weight=1 - yunohost service remove $app +if ynh_exec_warn_less yunohost service status "$app" >/dev/null; then + yunohost service remove "$app" fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 - # Remove the app-specific logrotate config ynh_remove_logrotate -#================================================= -# REMOVE THE REDIS DATABASE -#================================================= -ynh_script_progression --message="Removing the redis database..." --weight=1 - -ynh_redis_remove_db "$redis_db" - -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - # Remove the dedicated NGINX config ynh_remove_nginx_config +# Remove the log files +ynh_secure_remove --file="/var/log/$app" + +ynh_redis_remove_db "$redis_db" + #================================================= # REMOVE DEPENDENCIES #================================================= @@ -62,19 +39,6 @@ ynh_script_progression --message="Removing dependencies..." --weight=1 # Remove metapackage and its dependencies ynh_remove_nodejs -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= - -# Remove the log files -ynh_secure_remove --file="/var/log/$app" - -#================================================= -# GENERIC FINALIZATION -#================================================= - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 66ab649..9188542 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -11,8 +9,12 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD RESTORATION STEPS +# REINSTALL DEPENDENCIES #================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=5 + +# Define and install dependencies +ynh_install_nodejs --nodejs_version="$NODEJS_VERSION" #================================================= # RESTORE THE APP MAIN DIR @@ -22,14 +24,11 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" #================================================= -# SPECIFIC RESTORATION +# RESTORE THE MYSQL DATABASE #================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=5 +ynh_script_progression --message="Restoring the MySQL database..." --weight=1 -# Define and install dependencies -ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql #================================================= # REINSTALL PNPM @@ -47,63 +46,29 @@ pushd "$install_dir" ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build popd +# Set permissions to app files +chmod -R o-rwx "$install_dir" +chown -R "$app:www-data" "$install_dir" + #================================================= -# RESTORE THE NGINX CONFIGURATION +# RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE POSTGRESQL DATABASE -#================================================= -ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=1 - -ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name - -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/systemd/system/$app.service" -systemctl enable $app.service --quiet - -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 +systemctl enable "$app.service" --quiet +yunohost service add "$app" --description="A interplanetary blogging platform" --log="/var/log/$app/$app.log" ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= -# INTEGRATE SERVICE IN YUNOHOST +# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 -yunohost service add $app --description="A interplanetary blogging platform" --log="/var/log/$app/$app.log" - -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 - -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="All workers started" - -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="All workers started" ynh_systemd_action --service_name=nginx --action=reload @@ -111,4 +76,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last \ No newline at end of file +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index 61fd3d5..1fab3a6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -9,33 +7,14 @@ source _common.sh source /usr/share/yunohost/helpers - -#================================================= -# CHECK VERSION -#================================================= -ynh_script_progression --message="Checking version..." - -upgrade_type=$(ynh_check_app_version_changed) - -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= - #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 +ynh_script_progression --message="Stopping $app's systemd service..." --weight=1 # Stop service before backup, to not loose message in case of failed upgrade and restore -ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd +ynh_systemd_action --service_name="$app" --action="stop" --log_path=systemd -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 - -#================================================= -# STANDARD UPGRADE STEPS #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -43,46 +22,34 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If db_name doesn't exist, create it if [ -z "$db_name" ]; then - db_name=$(ynh_sanitize_dbid --db_name=$app) - ynh_app_setting_set --app=$app --key=db_name --value=$db_name + db_name=$(ynh_sanitize_dbid --db_name="$app") + ynh_app_setting_set --app="$app" --key=db_name --value="$db_name" fi # If install_dir doesn't exist, create it if [ -z "$install_dir" ]; then install_dir=/var/www/$app - ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir + ynh_app_setting_set --app="$app" --key=install_dir --value="$install_dir" fi -#================================================= -# DOWNLOAD, CHECK AND UNPACK SOURCE -#================================================= - -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep=".config/default.yml" -fi - -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # UPGRADE DEPENDENCIES #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=5 -ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +ynh_install_nodejs --nodejs_version="$NODEJS_VERSION" #================================================= -# NGINX CONFIGURATION +# DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 +ynh_script_progression --message="Upgrading source files..." -# Create a dedicated NGINX config -ynh_add_nginx_config +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep=".config/default.yml" + +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # BUILD APP @@ -100,38 +67,31 @@ pushd "$install_dir" ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run migrate popd +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R "$app:www-data" "$install_dir" + #================================================= -# SETUP SYSTEMD +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config - -#================================================= -# GENERIC FINALIZATION -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 +yunohost service add "$app" --description="A interplanetary blogging platform" --log="/var/log/$app/$app.log" # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="A interplanetary blogging platform" --log="/var/log/$app/$app.log" - #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 - -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd +ynh_script_progression --message="Starting $app's systemd service..." --weight=1 +ynh_systemd_action --service_name="$app" --action="start" --log_path=systemd #================================================= # END OF SCRIPT From 02185740678bd68199341eebbbb1e3f807565ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 6 Jun 2024 10:58:18 +0200 Subject: [PATCH 3/8] Pass COREPACK_ENABLE_DOWNLOAD_PROMPT=0 to pnpm install --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 8229a35..6a620ac 100755 --- a/scripts/install +++ b/scripts/install @@ -50,7 +50,7 @@ pushd "$install_dir" ynh_use_nodejs corepack enable corepack prepare pnpm@latest --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production ANTENNA_MIGRATION_SKIP=false ANTENNA_MIGRATION_COPY_LIMIT=0 ANTENNA_MIGRATION_READ_LIMIT=1000 pnpm run migrate popd diff --git a/scripts/restore b/scripts/restore index 9188542..07abb25 100755 --- a/scripts/restore +++ b/scripts/restore @@ -42,7 +42,7 @@ pushd "$install_dir" ynh_use_nodejs corepack enable corepack prepare pnpm@latest --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build popd diff --git a/scripts/upgrade b/scripts/upgrade index 1fab3a6..2c4849f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -62,7 +62,7 @@ pushd "$install_dir" ynh_use_nodejs corepack enable corepack prepare pnpm@latest --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm run build ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run migrate popd From e5b1832d255c04de5d65c8b525ab743d9e9210c5 Mon Sep 17 00:00:00 2001 From: Mateusz <2871798+orhtej2@users.noreply.github.com> Date: Sat, 27 Apr 2024 21:46:59 +0200 Subject: [PATCH 4/8] Fix calls to corepack --- scripts/install | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index 6a620ac..10f351f 100755 --- a/scripts/install +++ b/scripts/install @@ -48,8 +48,8 @@ pushd "$install_dir" curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs - corepack enable - corepack prepare pnpm@latest --activate + env $ynh_node_load_PATH corepack enable + env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production ANTENNA_MIGRATION_SKIP=false ANTENNA_MIGRATION_COPY_LIMIT=0 ANTENNA_MIGRATION_READ_LIMIT=1000 pnpm run migrate diff --git a/scripts/restore b/scripts/restore index 07abb25..dbe0918 100755 --- a/scripts/restore +++ b/scripts/restore @@ -40,8 +40,8 @@ pushd "$install_dir" curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs - corepack enable - corepack prepare pnpm@latest --activate + env $ynh_node_load_PATH corepack enable + env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build popd diff --git a/scripts/upgrade b/scripts/upgrade index 2c4849f..2f733ba 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,11 +60,11 @@ pushd "$install_dir" curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs - corepack enable - corepack prepare pnpm@latest --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm run build - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run migrate + env $ynh_node_load_PATH corepack enable + env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@latest --activate + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm run build + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run migrate popd chmod 750 "$install_dir" From 2b4eb6e0f1595682dedd5d67fadbefa24eaa0f40 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 16 Feb 2024 06:04:47 +0100 Subject: [PATCH 5/8] Update forge domain --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index bbf87e0..89c80be 100644 --- a/manifest.toml +++ b/manifest.toml @@ -11,8 +11,8 @@ maintainers = ["oufmilo"] [upstream] license = "AGPL-3.0" -website = "https://firefish.dev/" -demo = "https://info.firefish.dev/@firefish" +website = "https://joinfirefish.org" +demo = "https://info.firefish.dev" code = "https://firefish.dev/firefish/firefish" [integration] @@ -39,7 +39,7 @@ ram.runtime = "2G" [resources] [resources.sources.main] - url = "https://git.joinfirefish.org/firefish/firefish/-/archive/v1.0.5-rc/firefish-v1.0.5-rc.tar.gz" + url = "https://firefish.dev/firefish/firefish/-/archive/v1.0.5-rc/firefish-v1.0.5-rc.tar.gz" sha256 = "b9b59899eaddcdd94e10974e34af083bd9a9c6228046dc4d4af0f3a669ccb7ef" autoupdate.strategy = "latest_gitlab_release" From b7299084f67695ec3b723be035876460c921d4e5 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 6 Jun 2024 09:17:41 +0000 Subject: [PATCH 6/8] Auto-update READMEs --- README.md | 4 ++-- README_es.md | 4 ++-- README_eu.md | 4 ++-- README_fr.md | 4 ++-- README_gl.md | 4 ++-- README_zh_Hans.md | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 4156da6..b822453 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ I advise you to wait for the release of _Bookworm_ Debian 12. **Shipped version:** 1.0.5rc~ynh1 -**Demo:** +**Demo:** ## Screenshots @@ -40,7 +40,7 @@ I advise you to wait for the release of _Bookworm_ Debian 12. ## Documentation and resources -- Official app website: +- Official app website: - Upstream app code repository: - YunoHost Store: - Report a bug: diff --git a/README_es.md b/README_es.md index 365970d..b47ad5e 100644 --- a/README_es.md +++ b/README_es.md @@ -32,7 +32,7 @@ I advise you to wait for the release of _Bookworm_ Debian 12. **Versión actual:** 1.0.5rc~ynh1 -**Demo:** +**Demo:** ## Capturas @@ -40,7 +40,7 @@ I advise you to wait for the release of _Bookworm_ Debian 12. ## Documentaciones y recursos -- Sitio web oficial: +- Sitio web oficial: - Repositorio del código fuente oficial de la aplicación : - Catálogo YunoHost: - Reportar un error: diff --git a/README_eu.md b/README_eu.md index 3cf7461..43184e8 100644 --- a/README_eu.md +++ b/README_eu.md @@ -32,7 +32,7 @@ I advise you to wait for the release of _Bookworm_ Debian 12. **Paketatutako bertsioa:** 1.0.5rc~ynh1 -**Demoa:** +**Demoa:** ## Pantaila-argazkiak @@ -40,7 +40,7 @@ I advise you to wait for the release of _Bookworm_ Debian 12. ## Dokumentazioa eta baliabideak -- Aplikazioaren webgune ofiziala: +- Aplikazioaren webgune ofiziala: - Jatorrizko aplikazioaren kode-gordailua: - YunoHost Denda: - Eman errore baten berri: diff --git a/README_fr.md b/README_fr.md index cfcbef6..f133774 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Je vous conseille d'attendre la sortie de _Bookworm_ Debian 12. **Version incluse :** 1.0.5rc~ynh1 -**Démo :** +**Démo :** ## Captures d’écran @@ -39,7 +39,7 @@ Je vous conseille d'attendre la sortie de _Bookworm_ Debian 12. ## Documentations et ressources -- Site officiel de l’app : +- Site officiel de l’app : - Dépôt de code officiel de l’app : - YunoHost Store : - Signaler un bug : diff --git a/README_gl.md b/README_gl.md index 7364e65..7d28817 100644 --- a/README_gl.md +++ b/README_gl.md @@ -32,7 +32,7 @@ I advise you to wait for the release of _Bookworm_ Debian 12. **Versión proporcionada:** 1.0.5rc~ynh1 -**Demo:** +**Demo:** ## Capturas de pantalla @@ -40,7 +40,7 @@ I advise you to wait for the release of _Bookworm_ Debian 12. ## Documentación e recursos -- Web oficial da app: +- Web oficial da app: - Repositorio de orixe do código: - Tenda YunoHost: - Informar dun problema: diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 9e0a4bd..75e2c4d 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -32,7 +32,7 @@ I advise you to wait for the release of _Bookworm_ Debian 12. **分发版本:** 1.0.5rc~ynh1 -**演示:** +**演示:** ## 截图 @@ -40,7 +40,7 @@ I advise you to wait for the release of _Bookworm_ Debian 12. ## 文档与资源 -- 官方应用网站: +- 官方应用网站: - 上游应用代码库: - YunoHost 商店: - 报告 bug: From 04c2e73d025e9ca8ec1f45d8ef35a02621cefbc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 6 Jun 2024 12:41:02 +0200 Subject: [PATCH 7/8] Fix restore: it's postgresql not mysql --- scripts/restore | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/restore b/scripts/restore index dbe0918..e84bb18 100755 --- a/scripts/restore +++ b/scripts/restore @@ -24,11 +24,11 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" #================================================= -# RESTORE THE MYSQL DATABASE +# RESTORE THE POSTGRESQL DATABASE #================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=1 +ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=1 -ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql +ynh_psql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql #================================================= # REINSTALL PNPM From 90443c30bf0b8bd328c132af969aa181f80b6134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:51:48 +0200 Subject: [PATCH 8/8] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 89c80be..03fe20e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Firefish" description.en = "Fork of Misskey with better UI/UX, security, features" description.fr = "Un fork de Misskey avec une meilleure interface utilisateur, la sécurité, les fonctionnalités" -version = "1.0.5rc~ynh1" +version = "20240206~ynh1" maintainers = ["oufmilo"] @@ -39,8 +39,8 @@ ram.runtime = "2G" [resources] [resources.sources.main] - url = "https://firefish.dev/firefish/firefish/-/archive/v1.0.5-rc/firefish-v1.0.5-rc.tar.gz" - sha256 = "b9b59899eaddcdd94e10974e34af083bd9a9c6228046dc4d4af0f3a669ccb7ef" + url = "https://firefish.dev/firefish/firefish/-/archive/v20240206/firefish-v20240206.tar.gz" + sha256 = "a0160364e49120a7448202ecba1a7cd61ff8c96f29a97bd7de329ce05957a4d0" autoupdate.strategy = "latest_gitlab_release" [resources.system_user]