1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/chatonsinfos_ynh.git synced 2024-09-03 18:15:58 +02:00

Merge pull request #7 from YunoHost-Apps/testing

testing
This commit is contained in:
eric_G 2024-01-12 19:14:28 +01:00 committed by GitHub
commit b5a5007071
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 26 additions and 55 deletions

View file

@ -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: <https://framagit.org/chatons/chatonsinfos/-/blob/master/>
* Official admin documentation: <https://framagit.org/chatons/chatonsinfos/-/blob/master/README.md>
* Upstream app code repository: <https://framagit.org/chatons/chatonsinfos>
* YunoHost Store: <https://apps.yunohost.org/app/chatonsinfos>

View file

@ -19,7 +19,7 @@ Si vous navez 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 lapp : <https://framagit.org/chatons/chatonsinfos/-/blob/master/>
* Documentation officielle de ladmin : <https://framagit.org/chatons/chatonsinfos/-/blob/master/README.md>
* Dépôt de code officiel de lapp : <https://framagit.org/chatons/chatonsinfos>
* YunoHost Store: <https://apps.yunohost.org/app/chatonsinfos>

View file

@ -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

View file

@ -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
#=================================================

View file

@ -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

View file

@ -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 "<html><body>ChatonsInfos</body></html>" > $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

View file

@ -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"

View file

@ -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"

View file

@ -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...)
#=================================================