From 890038c7243ae2ca889df7372f88afe7265f84a0 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 16 Jun 2019 22:02:01 +0800 Subject: [PATCH] fix: update git config --- templates/drone-server.env.j2 | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/templates/drone-server.env.j2 b/templates/drone-server.env.j2 index 55996d0..86e0186 100644 --- a/templates/drone-server.env.j2 +++ b/templates/drone-server.env.j2 @@ -23,34 +23,24 @@ DRONE_DATABASE_DRIVER={{ drone_database_driver }} DRONE_DATABASE_DATASOURCE={{ drone_database_datasource }} {% endif %} +{% if drone_github_client_id != "" and drone_github_client_secret != "" %} DRONE_GITHUB_SERVER=https://github.com -{% if drone_github_client_id is defined %} DRONE_GITHUB_CLIENT_ID={{ drone_github_client_id }} -{% endif %} -{% if drone_github_client_secret is defined %} DRONE_GITHUB_CLIENT_SECRET={{ drone_github_client_secret }} -{% endif %} DRONE_GITHUB_DEBUG={{ drone_github_debug }} +{% endif %} +{% if drone_gitlab_client_id != "" and drone_gitlab_client_secret != "" %} DRONE_GITLAB_SERVER=https://gitlab.com -{% if drone_gitlab_client_id is defined %} DRONE_GITLAB_CLIENT_ID={{ drone_gitlab_client_id }} -{% endif %} -{% if drone_gitlab_client_secret is defined %} DRONE_GITLAB_CLIENT_SECRET={{ drone_gitlab_client_secret }} -{% endif %} DRONE_GITLAB_DEBUG={{ drone_github_debug }} +{% endif %} -{% if drone_gitea_server is defined %} +{% if drone_gitea_client_id != "" and drone_gitea_client_secret != "" %} DRONE_GITEA_SERVER={{ drone_gitea_server }} -{% endif %} -{% if drone_gitea_client_id is defined %} DRONE_GITEA_CLIENT_ID={{ drone_gitea_client_id }} -{% endif %} -{% if drone_gitea_client_secret is defined %} DRONE_GITEA_CLIENT_SECRET={{ drone_gitea_client_secret }} -{% endif %} -{% if drone_gitea_skip_verify is defined %} DRONE_GITEA_SKIP_VERIFY={{ drone_gitea_skip_verify }} -{% endif %} DRONE_GITEA_DEBUG={{ drone_github_debug }} +{% endif %}