1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/my-mind_ynh.git synced 2024-09-03 19:46:22 +02:00

Merge pull request #11 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2022-05-20 23:57:35 +02:00 committed by GitHub
commit 2f0ec4cf6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 75 additions and 34 deletions

View file

@ -15,9 +15,9 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview
Online Mindmapping Software
My Mind is a web application for creating and managing Mind maps. It is free to use and you can fork its source code.
**Shipped version:** 1.2~ynh3
**Shipped version:** 2.0~ynh1
**Demo:** http://my-mind.github.io/?map=examples/features.mymind

View file

@ -11,9 +11,9 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
## Vue d'ensemble
Éditeur de cartes mentales
My Mind is a web application for creating and managing Mind maps. It is free to use and you can fork its source code.
**Version incluse :** 1.2~ynh3
**Version incluse :** 2.0~ynh1
**Démo :** http://my-mind.github.io/?map=examples/features.mymind

View file

@ -11,9 +11,14 @@
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=7cddc776641b990073c8b7973352adc5e5a51b5e
backup_restore=1
multi_instance=1
change_url=1
;;; Options
Email=anmol@datamol.in
Notification=change
Email=
Notification=none
;;; Upgrade options
; commit=7cddc776641b990073c8b7973352adc5e5a51b5e
name=Merge pull request #10
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/ondras/my-mind/archive/v1.2.tar.gz
SOURCE_SUM=b1cfc9bf97bd6b073346f52a789cdafedc4d29f0d8bd4e646f7998392c1a8647
SOURCE_URL=https://github.com/ondras/my-mind/archive/v2.0.tar.gz
SOURCE_SUM=0ea718f800c2e778cd649132fcfd9c9836815258733295e4998a44e9d91be7a7
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -4,14 +4,8 @@ location __PATH__/ {
# Path to source
alias __FINALPATH__/ ;
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
index index.html index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
#client_max_body_size 50M;
try_files $uri $uri/ index.php index.html;

1
doc/DESCRIPTION.md Normal file
View file

@ -0,0 +1 @@
My Mind is a web application for creating and managing Mind maps. It is free to use and you can fork its source code.

View file

@ -6,7 +6,7 @@
"en": "Online Mindmapping Software",
"fr": "Éditeur de cartes mentales"
},
"version": "1.2~ynh3",
"version": "2.0~ynh1",
"url": "https://github.com/ondras/my-mind",
"upstream": {
"license": "MIT",
@ -23,24 +23,23 @@
"url": "https://datamol.org"
},
"requirements": {
"yunohost": ">= 4.2.4"
"yunohost": ">= 4.3.0"
},
"multi_instance": true,
"services": [
"nginx",
"php7.3-fpm"
"php8.0-fpm"
],
"arguments": {
"install" : [
{
"name": "domain",
"type": "domain",
"example": "example.com"
"type": "domain"
},
{
"name": "path",
"type": "path",
"example": "/example",
"example": "/mymind",
"default": "/mymind"
},
{

View file

@ -4,7 +4,9 @@
# COMMON VARIABLES
#=================================================
YNH_PHP_VERSION="7.3"
YNH_PHP_VERSION="8.0"
pkg_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-cli"
#=================================================
# PERSONAL HELPERS

View file

@ -53,4 +53,4 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for My Mind. (YunoHost will then actually copy those files to the archive)."
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."

View file

@ -32,7 +32,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up My Mind before changing its URL..." --weight=1
ynh_script_progression --message="Backing up the app before changing its URL..." --weight=1
# Backup the current version of the app
ynh_backup_before_upgrade
@ -106,4 +106,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for My Mind" --last
ynh_script_progression --message="Change of URL completed for $app" --last

View file

@ -13,6 +13,11 @@ source /usr/share/yunohost/helpers
# MANAGE SCRIPT FAILURE
#=================================================
ynh_clean_setup () {
### Remove this function if there's nothing to clean before calling the remove script.
true
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
@ -22,6 +27,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
phpversion=$YNH_PHP_VERSION
app=$YNH_APP_INSTANCE_NAME
@ -44,6 +50,13 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
@ -104,4 +117,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of My Mindcompleted" --last
ynh_script_progression --message="Installation of $app completed" --last

View file

@ -19,10 +19,18 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR
#=================================================
ynh_script_progression --message="Removing My Mind main directory..." --weight=2
ynh_script_progression --message="Removing app main directory..." --weight=2
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
@ -57,4 +65,4 @@ ynh_system_user_delete --username=$app
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of My Mind completed" --last
ynh_script_progression --message="Removal of $app completed" --last

View file

@ -14,6 +14,11 @@ source /usr/share/yunohost/helpers
# MANAGE SCRIPT FAILURE
#=================================================
ynh_clean_setup () {
### Remove this function if there's nothing to clean before calling the remove script.
true
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
@ -33,8 +38,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=1
ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}"
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
@ -57,7 +60,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring My Mind main directory..." --weight=3
ynh_script_progression --message="Restoring $app main directory..." --weight=3
ynh_restore_file --origin_path="$final_path"
@ -65,6 +68,14 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
@ -85,4 +96,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for My Mind" --last
ynh_script_progression --message="Restoration completed for $app" --last

View file

@ -19,7 +19,8 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
phpversion=$YNH_PHP_VERSION
#=================================================
# CHECK VERSION
#=================================================
@ -29,7 +30,7 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up My Mind before upgrading (may take a while)..." --weight=3
ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=3
# Backup the current version of the app
ynh_backup_before_upgrade
@ -92,6 +93,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
# Create a dedicated nginx config
ynh_add_nginx_config
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -111,4 +119,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of My Mind completed" --last
ynh_script_progression --message="Upgrade of $app completed" --last