From 58ca24f71b7c510f1526896e303dbefbf1d9636e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 11 Aug 2022 20:43:28 +0200 Subject: [PATCH] Fix hub config --- conf/hub_config | 6 +++--- scripts/install | 6 ++++++ scripts/upgrade | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/conf/hub_config b/conf/hub_config index 99df3d0..37d9b23 100644 --- a/conf/hub_config +++ b/conf/hub_config @@ -1,4 +1,4 @@ -github.com: -- user: __GITHUB_ACCOUNT__ - oauth_token: __GITHUB_TOKEN__ +__FORGE_WEBSITE__: +- user: __FORGE_USERNAME__ + oauth_token: __FORGE_TOKEN__ protocol: https diff --git a/scripts/install b/scripts/install index 7fb77c7..0824faf 100755 --- a/scripts/install +++ b/scripts/install @@ -132,6 +132,12 @@ ynh_secure_remove --file="$tempdir" #================================================= ynh_script_progression --message="Configure hub..." --weight=1 +if [ $used_forge = "GitHub" ] ; then + forge_website="github.com" +else + forge_website="gitlab.com" +fi + mkdir "$final_path/.config/" ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub" diff --git a/scripts/upgrade b/scripts/upgrade index 5685444..34b6691 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -141,6 +141,12 @@ ynh_secure_remove --file="$tempdir" #================================================= ynh_script_progression --message="Configure hub..." --weight=2 +if [ $used_forge = "GitHub" ] ; then + forge_website="github.com" +else + forge_website="gitlab.com" +fi + mkdir -p "$final_path/.config/" ynh_add_config --template="../conf/hub_config" --destination="$final_path/.config/hub"