From 631ec7dd3ce6e968072fa1b16ea124dc10392f80 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 11 Aug 2022 20:00:25 +0200 Subject: [PATCH] fix variable names --- manifest.json | 2 +- scripts/_common.sh | 1 + scripts/install | 2 +- scripts/upgrade | 8 ++++---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/manifest.json b/manifest.json index c971550..c8a86a4 100644 --- a/manifest.json +++ b/manifest.json @@ -74,7 +74,7 @@ "en": "Your forge's username", "fr": "Nom d'utilisateur sur votre forge" }, - "example": "Your account" + "example": "Your username" }, { "name": "forge_token", diff --git a/scripts/_common.sh b/scripts/_common.sh index 6828dee..8dcda10 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -33,6 +33,7 @@ fi set_forge_variables() { if [ $used_forge -eq "GitHub" ] + then github_username="\"$forge_username\"" github_token="\"$forge_token\"" gitlab_username="None" diff --git a/scripts/install b/scripts/install index 96b3267..7fb77c7 100755 --- a/scripts/install +++ b/scripts/install @@ -29,7 +29,7 @@ is_public=$YNH_APP_ARG_IS_PUBLIC admin=$YNH_APP_ARG_ADMIN password=$YNH_APP_ARG_PASSWORD used_forge=$YNH_APP_ARG_USED_FORGE -forge_account=$YNH_APP_ARG_FORGE_USERNAME +forge_username=$YNH_APP_ARG_FORGE_USERNAME forge_token=$YNH_APP_ARG_FORGE_TOKEN app=$YNH_APP_INSTANCE_NAME diff --git a/scripts/upgrade b/scripts/upgrade index 3ea46f4..5685444 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,7 +24,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) used_forge=$(ynh_app_setting_get --app=$app --key=used_forge) -forge_account=$(ynh_app_setting_get --app=$app --key=forge_account) +forge_username=$(ynh_app_setting_get --app=$app --key=forge_username) forge_token=$(ynh_app_setting_get --app=$app --key=forge_token) redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) @@ -88,13 +88,13 @@ then ynh_secure_remove --file="/var/log/$app-celery" fi -# If used_forge, forge_account, forge_token don't exist, create them +# If used_forge, forge_username, forge_token don't exist, create them if [ -z "$used_forge" ]; then used_forge="GitHub" - forge_account=$(ynh_app_setting_get --app=$app --key=github_account) + forge_username=$(ynh_app_setting_get --app=$app --key=github_account) forge_token=$(ynh_app_setting_get --app=$app --key=github_token) ynh_app_setting_set --app=$app --key=used_forge --value=$used_forge - ynh_app_setting_set --app=$app --key=forge_account --value=$forge_account + ynh_app_setting_set --app=$app --key=forge_username --value=$forge_username ynh_app_setting_set --app=$app --key=forge_token --value=$forge_token fi