From 93177dfa7d5c4d9764d0fb04625f130e561f9611 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 5 Aug 2022 10:50:45 +0200 Subject: [PATCH] Do not add swap if in CI --- scripts/install | 4 +++- scripts/restore | 4 +++- scripts/upgrade | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 3794626..0efc0a0 100644 --- a/scripts/install +++ b/scripts/install @@ -126,7 +126,9 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_print_info --message="Adding swap..." -ynh_add_swap --size=$swap_needed +if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then + ynh_add_swap --size=$swap_needed +fi #================================================= # INSTALL COMPOSER DEPENDENCIES diff --git a/scripts/restore b/scripts/restore index 74aa201..0f906b9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -105,7 +105,9 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ #================================================= ynh_script_progression --message="Adding swap..." -ynh_add_swap --size=$swap_needed +if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then + ynh_add_swap --size=$swap_needed +fi #================================================= # RESTORE THE LOGROTATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 98d5fb3..7ec3cc5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -168,7 +168,9 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Adding swap..." -ynh_add_swap --size=$swap_needed +if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then + ynh_add_swap --size=$swap_needed +fi #================================================= # COMPOSER AND FLARUM UPGRADE