fix get_gitea_token
This commit is contained in:
10
getsestuff
10
getsestuff
@@ -159,6 +159,10 @@ def check_repo(root, repo, url=None, branch=None):
|
||||
do('git clone %s' % url)
|
||||
pull = True
|
||||
created = doit
|
||||
if 'gitea' in url:
|
||||
hooksrc = '/afs/psi.ch/project/sinq/common/stow/markus/lib/gitea'
|
||||
docopy(f'{hooksrc}/get_gitea_token', '.git/hooks/')
|
||||
docopy(f'{hooksrc}/pre-commit', '.git/hooks/')
|
||||
if created:
|
||||
chdir(join(root, repo))
|
||||
docmd('git remote update')
|
||||
@@ -173,9 +177,9 @@ def check_repo(root, repo, url=None, branch=None):
|
||||
gitconfig['pull.rebase'] = 'True'
|
||||
gitconfig['remote.origin.url'] = url
|
||||
if 'gitea' in url:
|
||||
hooksrc = '/afs/psi.ch/project/sinq/common/stow/markus/lib/gitea'
|
||||
docopy(f'{hooksrc}/get_gitea_token', '.git/hooks/')
|
||||
docopy(f'{hooksrc}/pre-commit', '.git/hooks/')
|
||||
# hooksrc = '/afs/psi.ch/project/sinq/common/stow/markus/lib/gitea'
|
||||
# docopy(f'{hooksrc}/get_gitea_token', '.git/hooks/')
|
||||
# docopy(f'{hooksrc}/pre-commit', '.git/hooks/')
|
||||
gitconfig['credential.helper'] = f'{getcwd()}/.git/hooks/get_gitea_token'
|
||||
diff = {k: v for k, v in gitconfig.items() if v != prev.get(k) and v != prev.get(k.replace('branch.', ''))}
|
||||
if doit:
|
||||
|
||||
Reference in New Issue
Block a user