From 11243faa8098390d69966a624cd6f7f4cbce5a71 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 22 May 2021 11:24:18 +0200 Subject: [PATCH] Remove composer helper --- check_process | 13 +++++-------- manifest.json | 22 +--------------------- scripts/_common.sh | 44 -------------------------------------------- 3 files changed, 6 insertions(+), 73 deletions(-) diff --git a/check_process b/check_process index 2670a31..56af549 100644 --- a/check_process +++ b/check_process @@ -1,15 +1,12 @@ -# See here for more informations -# https://github.com/YunoHost/package_check#syntax-check_process-file - ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/pterodactyl" (PATH) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/pterodactyl" + is_public=1 language="fr" password="pass" - admin="john" (USER) - port="9980" (PORT) + admin="john" + port="9980" ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/manifest.json b/manifest.json index 5e11b08..18bc21a 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "aeris@e.email" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ @@ -26,29 +26,17 @@ "install": [{ "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Pterodactyl", - "fr": "Choisissez un nom de domaine pour Pterodactyl" - }, "example": "example.com" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Pterodactyl. For now, only /pterodactyl is accepted", - "fr": "Choisissez un chemin pour Pterodactyl. Pour l'instant seulement /pterodactyl est accepté" - }, "example": "/pterodactyl", "default": "/pterodactyl" }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose an admin user (should be a YunoHost registered user)", - "fr": "Choisissez l’administrateur (should be a YunoHost registered user)" - }, "example": "johndoe" }, { @@ -64,19 +52,11 @@ { "name": "password", "type": "password", - "ask": { - "en": "Set the administrator password", - "fr": "Définissez le mot de passe administrateur" - }, "example": "Choose a password" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public site?", - "fr": "Est-ce un site public ?" - }, "default": true } diff --git a/scripts/_common.sh b/scripts/_common.sh index 7cde4e6..6e1bd0a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -12,7 +12,6 @@ extra_php_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-gd php${ pkg_dependencies="libargon2-1 libsodium23 apt-transport-https unzip tar make gcc g++" - #================================================= # EXPERIMENTAL HELPERS #================================================= @@ -20,46 +19,3 @@ pkg_dependencies="libargon2-1 libsodium23 apt-transport-https unzip tar make gcc #======================= # COMPOSER #======================= - -# Execute a command with Composer -# -# usage: ynh_composer_exec [--workdir=$final_path] --commands="commands" -# | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path. -# | arg: -c, --commands - Commands to execute. -ynh_composer_exec () { - # Declare an array to define the options of this helper. - local legacy_args=wc - declare -Ar args_array=( [w]=workdir= [c]=commands= ) - local workdir - local commands - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - workdir="${workdir:-$final_path}" - - COMPOSER_HOME="$workdir/.composer" \ - php "$workdir/composer.phar" $commands \ - -d "$workdir" --quiet --no-interaction -} - -# Install and initialize Composer in the given directory -# -# usage: ynh_install_composer [--workdir=$final_path] -# | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path. -ynh_install_composer () { - # Declare an array to define the options of this helper. - local legacy_args=w - declare -Ar args_array=( [w]=workdir= ) - local workdir - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - workdir="${workdir:-$final_path}" - - curl -sS https://getcomposer.org/installer \ - | COMPOSER_HOME="$workdir/.composer" \ - php -- --quiet --install-dir="$workdir" \ - || ynh_die "Unable to install Composer." - - # update dependencies to create composer.lock - ynh_composer_exec --workdir="$workdir" --commands="install --no-dev" \ - || ynh_die "Unable to update core dependencies with Composer." -} \ No newline at end of file