From fc22737e172eb40647325cb38db9ec5f225ca97c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 11 May 2024 12:27:50 +0200 Subject: [PATCH] fix PHP version --- scripts/install | 7 +++++++ scripts/upgrade | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/scripts/install b/scripts/install index 5905512..3853b44 100755 --- a/scripts/install +++ b/scripts/install @@ -102,6 +102,13 @@ ynh_store_file_checksum --file="$install_dir/.env" chmod 400 "$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" + #================================================= # INSTALL THE CRON FILE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f88c8ef..6a9294e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -114,6 +114,13 @@ ynh_store_file_checksum --file="$install_dir/.env" chmod 400 "$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" + #================================================= # INSTALL THE CRON FILE #=================================================