diff --git a/README.md b/README.md index 2c5dac6..d9e1655 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ChatonsInfos is a protocol for sharing data about the CHATONS collective, its members and their services. -**Shipped version:** 1.0~ynh1 +**Shipped version:** 1.0~ynh2 **Demo:** https://stats.chatons.org/index.xhtml @@ -29,7 +29,6 @@ ChatonsInfos is a protocol for sharing data about the CHATONS collective, its me ## Documentation and resources -* Official app website: * Official admin documentation: * Upstream app code repository: * YunoHost Store: diff --git a/README_fr.md b/README_fr.md index 8b2f6d9..8abfb91 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ChatonsInfos est un protocole de partage de données sur le collectif CHATONS, ses membres et leurs services. -**Version incluse :** 1.0~ynh1 +**Version incluse :** 1.0~ynh2 **Démo :** https://stats.chatons.org/index.xhtml @@ -29,7 +29,6 @@ ChatonsInfos est un protocole de partage de données sur le collectif CHATONS, s ## Documentations et ressources -* Site officiel de l’app : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : * YunoHost Store: diff --git a/manifest.toml b/manifest.toml index af62330..edd2222 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,37 +5,37 @@ name = "Chatons Infos" description.en = "Create stats files Chatons compliant and enable configuration in config pannel" description.fr = "Génère automatiquement les fichiers de statistiques Chatons et permet leur configuration dans le panneau de configuration" -version = "1.0~ynh1" +version = "1.0~ynh2" maintainers = ["oiseauroch", "ljf"] [upstream] -# NB: Only the "license" key is mandatory. Remove entries for which there's no relevant data license = "AGPL-3.0" -website = "https://framagit.org/chatons/chatonsinfos/-/blob/master/" demo = "https://stats.chatons.org/index.xhtml" admindoc = "https://framagit.org/chatons/chatonsinfos/-/blob/master/README.md" code = "https://framagit.org/chatons/chatonsinfos" [integration] -yunohost = ">= 11.1.0" +yunohost = ">= 11.2" architectures = "all" multi_instance = false + ldap = "not_relevant" + sso = "not_relevant" + disk = "50M" ram.build = "50M" ram.runtime = "50M" [install] [install.domain] - # this is a generic question - ask strings are automatically handled by YunoHost's core type = "domain" [install.path] - # this is a generic question - ask strings are automatically handled by YunoHost's core type = "path" default = "/.well_known/chatonsinfos/" + [resources] # See the packaging documentation for the full set # of explanation regarding the behavior and properties for each of those @@ -44,7 +44,7 @@ ram.runtime = "50M" [resources.sources.main] url = "https://framagit.org/chatons/chatonsinfos/-/archive/master/chatonsinfos-master.tar.gz?path=MODELES" - sha256 = "664e1c934ea2fd0b5ee4ff55bbabbc81227a256ee12fd7d18319d13c095690bb" + sha256 = "d9853b736128e862c3af2a8d7d5073df1c4c80c240e1afac859530c58d39b82e" format = "tar.gz" in_subdir = true diff --git a/scripts/backup b/scripts/backup index 0fc4824..1927e79 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,11 +15,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_print_info --message="Declaring files to be backed up..." -### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs -### to be backuped and not an actual copy of any file. The actual backup that -### creates and fill the archive with the files happens in the core after this -### script is called. Hence ynh_backups calls takes basically 0 seconds to run. - #================================================= # BACKUP THE APP MAIN DIR #================================================= diff --git a/scripts/change_url b/scripts/change_url index 6e51e15..6492778 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -3,6 +3,15 @@ source _common.sh source /usr/share/yunohost/helpers +#================================================= +# MODIFY URL IN NGINX CONF +#================================================= +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 + ynh_change_url_nginx_config +#================================================= +# END OF SCRIPT +#================================================= + ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/install b/scripts/install index a038530..0a75d0c 100755 --- a/scripts/install +++ b/scripts/install @@ -9,18 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= - - #================================================= # STORE SETTINGS FROM MANIFEST #================================================= ynh_app_setting_set --app=$app --key=host_server_distribution --value="YunoHost" - #================================================= # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) #================================================= @@ -28,13 +22,10 @@ ynh_app_setting_set --app=$app --key=host_server_distribution --value="YunoHost" #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -### `ynh_setup_source` is used to install an app from a zip or tar.gz file, -### downloaded from an upstream source, like a git repository. -### `ynh_setup_source` use the file conf/app.src - # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir/sources" mkdir $install_dir/public + # Empty html page to fix the CI echo "ChatonsInfos" > $install_dir/public/index.html # $install_dir will automatically be initialized with some decent @@ -66,7 +57,6 @@ orga_path="$install_dir/public/organization.properties" ynh_write_var_in_file --file="$orga_path" --key="file.datetime" --value="$(date '+%Y-%m-%dT%H:%M:%S')" ynh_write_var_in_file --file="$orga_path" --key="file.generator" --value="chatonsinfos_ynh" - chown -R $app:www-data "$install_dir/public" #================================================= @@ -82,14 +72,12 @@ generate_config_panel ynh_script_progression --message="Adding cron job to generate metrics..." --weight=1 cron_path="/etc/cron.daily/$app" -ynh_add_config --template="../conf/cron" --destination="$cron_path" +ynh_add_config --template="cron" --destination="$cron_path" chown root: "$cron_path" chmod 644 "$cron_path" -#================================================= -# GENERIC FINALIZATION -#================================================= #================================================= # END OF SCRIPT #================================================= + ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index 2b9f3ab..901e482 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,6 +9,11 @@ source _common.sh source /usr/share/yunohost/helpers +#================================================= +# REMOVE SYSTEM CONFIGURATIONS +#================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 + ynh_remove_nginx_config ynh_secure_remove --file="/etc/cron.daily/$app" diff --git a/scripts/restore b/scripts/restore index b10a405..cea07a9 100755 --- a/scripts/restore +++ b/scripts/restore @@ -17,13 +17,9 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -# $install_dir will automatically be initialized with some decent -# permission by default ... however, you may need to recursively reapply -# ownership to all files such as after the ynh_setup_source step chown -R root:root "$install_dir/sources" chown -R $app:www-data "$install_dir/public" - #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= @@ -31,7 +27,6 @@ chown -R $app:www-data "$install_dir/public" #================================================= 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" ynh_restore_file --origin_path="/etc/cron.daily/$app" diff --git a/scripts/upgrade b/scripts/upgrade index 76979f8..e80ded4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,25 +11,6 @@ source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -#ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# -# N.B. : the followings setting migrations snippets are provided as *EXAMPLES* -# of what you may want to do in some cases (e.g. a setting was not defined on -# some legacy installs and you therefore want to initiaze stuff during upgrade) -# - -# If db_name doesn't exist, create it -#if [ -z "$db_name" ]; then -# db_name=$(ynh_sanitize_dbid --db_name=$app) -#REMOVEME? # ynh_app_setting_set --app=$app --key=db_name --value=$db_name -#fi - #================================================= # "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) #=================================================