From 2146effb72902a107834c2034ab776d05de1bb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 15 Mar 2024 13:03:09 +0100 Subject: [PATCH] Fix argument using _ not - --- scripts/install | 2 +- scripts/upgrade | 6 ++++++ tests.toml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index cf9b2a1..86675d7 100644 --- a/scripts/install +++ b/scripts/install @@ -60,7 +60,7 @@ chown "$app:$app" "$install_dir/config.py" #================================================= ynh_script_progression --message="Run Yunorunner's finish_install script..." -if [ $context != "personal-ci" ] && [ "${PACKAGE_CHECK_EXEC:-0}" -ne 0 ]; then +if [ "$context" == "official_infra" ] && [ "${PACKAGE_CHECK_EXEC:-0}" -ne 0 ]; then tweak_yunohost fi diff --git a/scripts/upgrade b/scripts/upgrade index b280edf..33ca2f4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,6 +35,12 @@ if yunohost firewall list | grep -q "\- $port$"; then ynh_exec_warn_less yunohost firewall disallow TCP "$port" fi +# Values now use underscore +if echo "$context" | grep -- -; then + context=$(echo "$context" | tr - _) + ynh_app_setting_set --app="$app" --key="context" --value="$context" +fi + # Remove Pythonz ynh_secure_remove --file="$install_dir/.pythonz" diff --git a/tests.toml b/tests.toml index 40b75ac..51ba052 100644 --- a/tests.toml +++ b/tests.toml @@ -4,7 +4,7 @@ test_format = 1.0 [default] - args.context = "personal-ci" + args.context = "personal_ci" args.mode = "manual" args.cluster = false