From 7602aa4d9766fe5ccbcf4fd2405edfdc5fe4f4ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 3 Mar 2024 12:33:18 +0100 Subject: [PATCH] Fix: run composer in install dir --- scripts/install | 11 +++-------- scripts/upgrade | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/scripts/install b/scripts/install index 49390c4..4f1ef32 100644 --- a/scripts/install +++ b/scripts/install @@ -21,13 +21,6 @@ ynh_script_progression --message="Installing NodeJS..." --weight=1 ynh_install_nodejs --nodejs_version=$nodejs_version -#================================================= -# INSTALL AND INITIALIZE COMPOSER -#================================================= -ynh_script_progression --message="Installing Composer..." --weight=10 - -ynh_install_composer --install_args="--no-dev" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -43,9 +36,11 @@ chown -R "$app:www-data" "$install_dir" #================================================= # INSTALL AND INITIALIZE COMPOSER #================================================= -ynh_script_progression --message="Installing $app..." --weight=30 +ynh_script_progression --message="Installing $app with Composer..." --weight=30 pushd "$install_dir/sources" + ynh_install_composer --install_args="--no-dev" + ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn install --pure-lockfile --prod ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn run buildall diff --git a/scripts/upgrade b/scripts/upgrade index 6c5257e..bf8ec02 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,13 +27,6 @@ ynh_script_progression --message="Upgrading NodeJS..." --weight=1 ynh_install_nodejs --nodejs_version=$nodejs_version -#================================================= -# INSTALL AND INITIALIZE COMPOSER -#================================================= -ynh_script_progression --message="Upgrading Composer..." --weight=10 - -ynh_install_composer --install_args="--no-dev" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -50,9 +43,11 @@ chown -R "$app:www-data" "$install_dir" #================================================= # INSTALL AND INITIALIZE COMPOSER #================================================= -ynh_script_progression --message="Building $app..." --weight=30 +ynh_script_progression --message="Building $app with Composer..." --weight=30 pushd "$install_dir/sources" + ynh_install_composer --install_args="--no-dev" + ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn install --pure-lockfile --prod ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn run buildall