mirror of
https://github.com/YunoHost-Apps/icecoder_ynh.git
synced 2024-09-03 19:26:10 +02:00
commit
2a3c4e6a2f
17 changed files with 90 additions and 304 deletions
14
README.md
14
README.md
|
@ -16,24 +16,14 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
## Overview
|
||||
|
||||
A code editor in your browser.
|
||||
Code editor awesomeness... in your browser
|
||||
|
||||
Note that this app is designed to be coupled to my_webapp / Custom webapp to be able to edit its code directly from a web browser.
|
||||
|
||||
|
||||
**Shipped version:** 8.1~ynh1
|
||||
|
||||
**Demo:** http://demo.icecoder.net/ICEcoder/
|
||||
## Disclaimers / important information
|
||||
|
||||
## Limitations
|
||||
|
||||
* If the editor's current folder is where the editor is, the editor's folder is visible in the file tree.
|
||||
|
||||
## Additional information
|
||||
|
||||
* You will need to configure things like password **directly** in the app.
|
||||
* If you change the URL of this app, you don't change the real URL but the internal path (the process is the same as installation).
|
||||
|
||||
## Documentation and resources
|
||||
|
||||
* Official app website: <https://icecoder.net>
|
||||
|
|
15
README_fr.md
15
README_fr.md
|
@ -16,23 +16,14 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
|||
|
||||
## Vue d’ensemble
|
||||
|
||||
Un éditeur de code dans votre navigateur.
|
||||
Un éditeur de code impressionnant... dans votre navigateur
|
||||
|
||||
Notez que cette app est conçue pour s'intégrer à my_webapp / custom webapp dans le but de pouvoir éditer le code depuis votre navigateur.
|
||||
|
||||
|
||||
**Version incluse :** 8.1~ynh1
|
||||
|
||||
**Démo :** http://demo.icecoder.net/ICEcoder/
|
||||
## Avertissements / informations importantes
|
||||
|
||||
## Limitations
|
||||
|
||||
* Si le dossier actuel de l'éditeur se trouve là où se trouve l'éditeur, le dossier de l'éditeur est visible dans l'arbre des fichiers.
|
||||
|
||||
## Informations additionnelles
|
||||
|
||||
* Vous devrez configurer des éléments comme le mot de passe **directement** dans l'application.
|
||||
* Si vous changez l'URL de cette application, vous ne changez pas l'URL réelle mais le chemin interne (le processus est le même que pour l'installation).
|
||||
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l’app : <https://icecoder.net>
|
||||
|
|
|
@ -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,6 +0,0 @@
|
|||
SOURCE_URL=https://github.com/icecoder/ICEcoder/archive/refs/tags/8.1.zip
|
||||
SOURCE_SUM=669aa799cab161334ec108fbaafea97061859622433ad98188ddb19e86285f31
|
||||
SOURCE_SUM_PRG=/usr/bin/sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_EXTRACT=true
|
|
@ -1,2 +1,3 @@
|
|||
A code editor in your browser.
|
||||
Code editor awesomeness... in your browser
|
||||
|
||||
Note that this app is designed to be coupled to my_webapp / Custom webapp to be able to edit its code directly from a web browser.
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
Un éditeur de code dans votre navigateur.
|
||||
Un éditeur de code impressionnant... dans votre navigateur
|
||||
|
||||
Notez que cette app est conçue pour s'intégrer à my_webapp / custom webapp dans le but de pouvoir éditer le code depuis votre navigateur.
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
58
manifest.toml
Normal file
58
manifest.toml
Normal file
|
@ -0,0 +1,58 @@
|
|||
packaging_format = 2
|
||||
|
||||
id = "icecoder"
|
||||
name = "ICEcoder"
|
||||
description.en = "Code editor awesomeness... in your browser"
|
||||
description.fr = "Un éditeur de code impressionnant... dans votre navigateur"
|
||||
|
||||
version = "8.1~ynh1"
|
||||
|
||||
maintainers = ["Stylix58"]
|
||||
|
||||
[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"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.2"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
|
||||
ldap = false
|
||||
|
||||
sso = false
|
||||
|
||||
disk = "50M"
|
||||
ram.build = "50M"
|
||||
ram.runtime = "50M"
|
||||
|
||||
[install]
|
||||
[install.custom_webapp_id]
|
||||
ask.en = "Indicate the ID of the Custom Webapp where you want to install this app"
|
||||
ask.fr = "Indiquez l'ID de la Custom Webapp dans laquelle vous voulez installer cette app"
|
||||
help.en = "This should be my_webapp, or my_webapp__2, __3, __4 etc if you have several installs of my_webapp."
|
||||
help.fr = "Il s'agit de my_webapp ou my_webapp__2, __3, __4 etc si vous avez plusieurs installations de my_webapp."
|
||||
type = "string"
|
||||
|
||||
[install.sub_folder]
|
||||
ask.en = "Indicate the name of the final_path subfolder containing the files accessible from your browser"
|
||||
ask.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."
|
||||
help.fr = "Par exemple pour Custom Webapp il se situe dans le sous-dossier /www."
|
||||
type = "path"
|
||||
default = "/www"
|
||||
|
||||
[resources]
|
||||
[resources.sources.main]
|
||||
url = "https://github.com/icecoder/ICEcoder/archive/refs/tags/8.1.zip"
|
||||
sha256 = "669aa799cab161334ec108fbaafea97061859622433ad98188ddb19e86285f31"
|
||||
|
||||
|
||||
[resources.system_user]
|
||||
|
||||
[resources.install_dir]
|
||||
|
||||
[resources.permissions]
|
|
@ -4,9 +4,6 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
#pkg_dependencies="deb1 deb2 php$YNH_DEFAULT_PHP_VERSION-deb1 php$YNH_DEFAULT_PHP_VERSION-deb2"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -1,41 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_print_info --message="Loading installation settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
#=================================================
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$final_path"
|
||||
ynh_backup --src_path="$install_dir"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -1,59 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
#=================================================
|
||||
|
||||
app_id=$YNH_APP_ARG_APP_ID
|
||||
sub_folder=$YNH_APP_ARG_SUB_FOLDER
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating installation parameters..."
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app_id --key=final_path)$sub_folder/icecoder
|
||||
test -e "$(ynh_app_setting_get --app=$app_id --key=final_path)" || ynh_die --message="You don't have installed $app_id before installing this app"
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Storing installation settings..."
|
||||
|
||||
ynh_app_setting_set --app=$app --key=app_id --value=$app_id
|
||||
ynh_app_setting_set --app=$app --key=sub_folder --value=$sub_folder
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setting up source files..."
|
||||
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app_id:www-data "$final_path"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $custom_webapp_id:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -1,35 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing app main directory..."
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Removal of $app completed"
|
||||
|
|
|
@ -1,41 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
app_id=$(ynh_app_setting_get --app=$app --key=app_id)
|
||||
sub_folder=$(ynh_app_setting_get --app=$app --key=sub_folder)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..."
|
||||
|
||||
test -e "$(ynh_app_setting_get --app=$app_id --key=final_path)" || ynh_die --message="You don't have installed $app_id before installing this app"
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
|
@ -43,11 +10,11 @@ test ! -e "$final_path" || ynh_die --message="This path already contains a folde
|
|||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..."
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $custom_webapp_id:www-data "$install_dir"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app_id:www-data "$final_path"
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -1,65 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
app_id=$(ynh_app_setting_get --app=$app --key=app_id)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Checking version..."
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..."
|
||||
ynh_script_progression --message="Upgrading source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --keep="/data"
|
||||
fi
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep="/data"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app_id:www-data "$final_path"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $custom_webapp_id:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
9
tests.toml
Normal file
9
tests.toml
Normal file
|
@ -0,0 +1,9 @@
|
|||
test_format = 1.0
|
||||
|
||||
[default]
|
||||
|
||||
preinstall = """
|
||||
sudo yunohost app install my_webapp --force -a "domain=domain.tld&path=/path&with_sftp=1&password=myreallystrengthpassword&init_main_permission=visitors&phpversion=8.2&database=none"
|
||||
"""
|
||||
|
||||
args.custom_webapp_id = "my_webapp"
|
Loading…
Reference in a new issue