From 6e0d9460ee22c75ae11c0e1d16b9a816f729d76d Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 3 May 2024 20:43:10 +0200 Subject: [PATCH 1/7] fix php version --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index a854acc..a380ff9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -#REMOVEME? YNH_PHP_VERSION="8.1" +phpversion="8.1" YNH_COMPOSER_VERSION="2.5.1" From bf113f499687b8fc1d1db86b8d5281a6f118cae7 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 3 May 2024 20:43:40 +0200 Subject: [PATCH 2/7] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 15fa755..cb74033 100755 --- a/scripts/install +++ b/scripts/install @@ -63,7 +63,7 @@ ynh_add_nginx_config #================================================= # INSTALL COMPOSER DEPENDENCIES #================================================= -#REMOVEME? ynh_script_progression --message="Installing composer dependencies..." +ynh_script_progression --message="Installing composer dependencies..." ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir" From ccca8ab5ae7ccc7cba8d5cad6b927a4738efe355 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 3 May 2024 22:16:33 +0200 Subject: [PATCH 3/7] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index cb74033..b252063 100755 --- a/scripts/install +++ b/scripts/install @@ -89,6 +89,7 @@ ynh_script_progression --message="Deploying..." pushd "$install_dir" ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install + ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan lang:generate -vvv ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn run production ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password=$password ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan passport:client --password -n > key.txt From 08ad9dde5f6e37c4c6989adc7689bd9027dabd3f Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 3 May 2024 22:42:45 +0200 Subject: [PATCH 4/7] Update install --- scripts/install | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/install b/scripts/install index b252063..dbdbe78 100755 --- a/scripts/install +++ b/scripts/install @@ -81,6 +81,13 @@ ynh_add_config --template=".env" --destination="$install_dir/.env" chmod 600 $install_dir/.env chown $app:$app $install_dir/.env +#========= +# FIX PHP VERSION +#========== +ynh_script_progression --message="Fixing php version in package.json..." --weight=1 + +ynh_replace_string --target_file="$install_dir/package.json" --match_string="php artisan lang:generate -vvv" --replace_string="php$phpversion artisan lang:generate -vvv" + #================================================= # DEPLOY #================================================= From 24f7f13c88bc1401ae1ccb1851c6066693a13f70 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 3 May 2024 22:53:41 +0200 Subject: [PATCH 5/7] cosmetic --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index dbdbe78..1a5fcfd 100755 --- a/scripts/install +++ b/scripts/install @@ -81,9 +81,9 @@ ynh_add_config --template=".env" --destination="$install_dir/.env" chmod 600 $install_dir/.env chown $app:$app $install_dir/.env -#========= +#================================================== # FIX PHP VERSION -#========== +#================================================== ynh_script_progression --message="Fixing php version in package.json..." --weight=1 ynh_replace_string --target_file="$install_dir/package.json" --match_string="php artisan lang:generate -vvv" --replace_string="php$phpversion artisan lang:generate -vvv" From e206eac4ba1b652c24ce62a807db414777b5ec66 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 3 May 2024 22:55:08 +0200 Subject: [PATCH 6/7] fix php version --- scripts/upgrade | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index aea1ed3..2766be4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,6 +102,13 @@ ynh_backup_if_checksum_is_different --file="$install_dir/.env" ynh_add_config --template=".env" --destination="$install_dir/.env" +#================================================== +# FIX PHP VERSION +#================================================== +ynh_script_progression --message="Fixing php version in package.json..." --weight=1 + +ynh_replace_string --target_file="$install_dir/package.json" --match_string="php artisan lang:generate -vvv" --replace_string="php$phpversion artisan lang:generate -vvv" + #================================================= # DEPLOYMENT #================================================= From de3c2eb1e22456530bf250a335a406a3b799485c Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 3 May 2024 22:57:21 +0200 Subject: [PATCH 7/7] remove previous test --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index 1a5fcfd..4b4bbdd 100755 --- a/scripts/install +++ b/scripts/install @@ -96,7 +96,6 @@ ynh_script_progression --message="Deploying..." pushd "$install_dir" ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install - ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan lang:generate -vvv ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn run production ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password=$password ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan passport:client --password -n > key.txt