mirror of
https://github.com/YunoHost-Apps/icecoder_ynh.git
synced 2024-09-03 19:26:10 +02:00
v2
This commit is contained in:
parent
1639951ac7
commit
07e64fac10
11 changed files with 14 additions and 188 deletions
|
@ -1,20 +0,0 @@
|
|||
;; Test complet
|
||||
; pre-install
|
||||
sudo yunohost app install my_webapp --force -a "domain=domain.tld&path=/path&with_sftp=1&password=myreallystrengthpassword&init_main_permission=visitors&phpversion=7.4&with_mysql=1"
|
||||
; Manifest
|
||||
app_id="my_webapp"
|
||||
sub_folder="/www"
|
||||
domain="domain.tld"
|
||||
path="/icecoder"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
setup_root=0
|
||||
setup_nourl=0
|
||||
setup_private=0
|
||||
setup_public=0
|
||||
upgrade=1
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
port_already_use=0
|
||||
change_url=1
|
|
@ -1,60 +0,0 @@
|
|||
{
|
||||
"name": "ICEcoder",
|
||||
"id": "icecoder",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "Code editor awesomeness... in your browser",
|
||||
"fr": "Un éditeur de code impressionnant... dans votre navigateur"
|
||||
},
|
||||
"version": "8.1~ynh1",
|
||||
"url": "https://icecoder.net",
|
||||
"upstream": {
|
||||
"license": "AGPL-3.0-only",
|
||||
"website": "https://icecoder.net",
|
||||
"demo": "http://demo.icecoder.net/ICEcoder/",
|
||||
"admindoc": "https://icecoder.net/manual",
|
||||
"code": "https://github.com/icecoder/ICEcoder"
|
||||
},
|
||||
"license": "AGPL-3.0-only",
|
||||
"maintainer": {
|
||||
"name": "Stylix58",
|
||||
"email": "lateman-jpeg@outlook.fr"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.3.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
"nginx",
|
||||
"php7.3-fpm"
|
||||
],
|
||||
"arguments": {
|
||||
"install": [
|
||||
{
|
||||
"name": "app_id",
|
||||
"type": "string",
|
||||
"ask": {
|
||||
"en": "Indicate the ID of the Custom Webapp where you want to install this app",
|
||||
"fr": "Indiquez l'ID de la Custom Webapp dans laquelle vous voulez installer cette app"
|
||||
},
|
||||
"help": {
|
||||
"en": "You can get the ID in Custom Webapp's settings.",
|
||||
"fr": "Vous pouvez obtenir l'ID dans les paramètres de la Custom Webapp."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sub_folder",
|
||||
"type": "path",
|
||||
"ask": {
|
||||
"en": "Indicate the name of the final_path subfolder containing the files accessible from your browser",
|
||||
"fr": "Indiquer le nom du sous-dossier du final_path contenant les fichiers accessibles depuis votre navigateur"
|
||||
},
|
||||
"help": {
|
||||
"en": "For example for Custom Webapp it is located in the /www subfolder.",
|
||||
"fr": "Par exemple pour Custom Webapp il se situe dans le sous-dossier /www."
|
||||
},
|
||||
"default": "/www"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -15,18 +15,19 @@ website = "https://icecoder.net"
|
|||
demo = "http://demo.icecoder.net/ICEcoder/"
|
||||
admindoc = "https://icecoder.net/manual"
|
||||
code = "https://github.com/icecoder/ICEcoder"
|
||||
cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number)
|
||||
fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin.
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 4.3.0"
|
||||
architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"]
|
||||
yunohost = ">= 11.2"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials.
|
||||
sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal.
|
||||
disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ...
|
||||
ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
||||
ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
||||
|
||||
ldap = false
|
||||
|
||||
sso = false
|
||||
|
||||
disk = "50M"
|
||||
ram.build = "50M"
|
||||
ram.runtime = "50M"
|
||||
|
||||
[install]
|
||||
[install.app_id]
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
#REMOVEME? #pkg_dependencies="deb1 deb2 php$YNH_DEFAULT_PHP_VERSION-deb1 php$YNH_DEFAULT_PHP_VERSION-deb2"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -10,22 +10,6 @@
|
|||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
#REMOVEME? ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
#REMOVEME? ynh_print_info --message="Loading installation settings..."
|
||||
|
||||
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
|
||||
|
||||
#=================================================
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
|
|
|
@ -9,31 +9,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
#REMOVEME? ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
#=================================================
|
||||
|
||||
#REMOVEME? app_id=$YNH_APP_ARG_APP_ID
|
||||
#REMOVEME? sub_folder=$YNH_APP_ARG_SUB_FOLDER
|
||||
|
||||
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
#REMOVEME? ynh_script_progression --message="Validating installation parameters..."
|
||||
|
||||
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app_id --key=install_dir)$sub_folder/icecoder
|
||||
#REMOVEME? #REMOVEME? test -e "$(ynh_app_setting_get --app=$app_id --key=install_dir)" || ynh_die --message="You don't have installed $app_id before installing this app"
|
||||
#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
|
@ -47,11 +22,9 @@ ynh_app_setting_set --app=$app --key=sub_folder --value=$sub_folder
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setting up source files..."
|
||||
|
||||
#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app_id:www-data "$install_dir"
|
||||
|
||||
|
|
|
@ -10,32 +10,6 @@
|
|||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
#REMOVEME? ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
#REMOVEME? ynh_script_progression --message="Loading installation settings..."
|
||||
|
||||
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
|
||||
#REMOVEME? app_id=$(ynh_app_setting_get --app=$app --key=app_id)
|
||||
#REMOVEME? sub_folder=$(ynh_app_setting_get --app=$app --key=sub_folder)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
#=================================================
|
||||
#REMOVEME? ynh_script_progression --message="Validating restoration parameters..."
|
||||
|
||||
#REMOVEME? #REMOVEME? test -e "$(ynh_app_setting_get --app=$app_id --key=install_dir)" || ynh_die --message="You don't have installed $app_id before installing this app"
|
||||
#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
|
@ -45,9 +19,9 @@ ynh_script_progression --message="Restoring the app main directory..."
|
|||
|
||||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app_id:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -9,37 +9,12 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
#REMOVEME? ynh_script_progression --message="Loading installation settings..."
|
||||
|
||||
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#REMOVEME? app_id=$(ynh_app_setting_get --app=$app --key=app_id)
|
||||
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Checking version..."
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
|
||||
|
||||
# Backup the current version of the app
|
||||
#REMOVEME? ynh_backup_before_upgrade
|
||||
#REMOVEME? ynh_clean_setup () {
|
||||
# Restore it if the upgrade fails
|
||||
#REMOVEME? ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
#REMOVEME? ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
|
@ -57,7 +32,6 @@ then
|
|||
ynh_setup_source --dest_dir="$install_dir" --keep="/data"
|
||||
fi
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app_id:www-data "$install_dir"
|
||||
|
||||
|
|
3
tests.toml
Normal file
3
tests.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
test_format = 1.0
|
||||
|
||||
[default]
|
Loading…
Reference in a new issue