From 1f7388b57599207249e88b56622ba2f7892a037e Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 26 Jun 2022 02:36:04 +0800 Subject: [PATCH] up --- plugins/gogs/hook/commit.tpl | 4 ++-- plugins/gogs/index.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/gogs/hook/commit.tpl b/plugins/gogs/hook/commit.tpl index c6a7983ef..7070accf5 100755 --- a/plugins/gogs/hook/commit.tpl +++ b/plugins/gogs/hook/commit.tpl @@ -2,7 +2,7 @@ echo `date` -GITADDR="{$GITROOTURL}/{$USERNAME}/{$PROJECT}" +GITADDR="{$GITROOTURL}/{$USERNAME}/{$PROJECT}.git" GIT_SDIR="{$CODE_DIR}" GIT_USER_DIR="${GIT_SDIR}/{$USERNAME}" @@ -24,7 +24,7 @@ cd $GIT_PROJECT_DIR && git pull # cd $GIT_PROJECT_DIR && env -i git pull origin master - +#更新的目的地址 WEB_PATH={$WEB_ROOT}/{$USERNAME}/{$PROJECT} mkdir -p $WEB_PATH diff --git a/plugins/gogs/index.py b/plugins/gogs/index.py index 0d8e10da3..f909297f2 100755 --- a/plugins/gogs/index.py +++ b/plugins/gogs/index.py @@ -593,8 +593,8 @@ def projectScriptLoad(): cc_content = mw.readFile(commit_tpl) - sshUrl = 'http://127.0.0.1:' + getHttpPort() - cc_content = cc_content.replace('{$GITROOTURL}', sshUrl) + gitPath = getRootPath() + cc_content = cc_content.replace('{$GITROOTURL}', gitPath) cc_content = cc_content.replace('{$CODE_DIR}', codeDir) cc_content = cc_content.replace('{$USERNAME}', user) cc_content = cc_content.replace('{$PROJECT}', args['name'])