mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Add update hook template
This adds a script that can be used as an update hook to check all commits for validity and to regenerate the package details page before updating a named ref. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
ad17b9e2b4
commit
943b6bc976
4 changed files with 419 additions and 0 deletions
|
@ -18,6 +18,7 @@ aur_db_pass = config.get('database', 'password')
|
|||
|
||||
repo_base_path = config.get('serve', 'repo-base')
|
||||
repo_regex = config.get('serve', 'repo-regex')
|
||||
git_update_hook = config.get('serve', 'git-update-hook')
|
||||
git_shell_cmd = config.get('serve', 'git-shell-cmd')
|
||||
|
||||
def repo_path_validate(path):
|
||||
|
@ -60,6 +61,7 @@ def setup_repo(repo, user):
|
|||
|
||||
repo_path = repo_base_path + '/' + repo + '.git/'
|
||||
pygit2.init_repository(repo_path, True)
|
||||
os.symlink(git_update_hook, repo_path + 'hooks/update')
|
||||
|
||||
def check_permissions(pkgbase, user):
|
||||
db = mysql.connector.connect(host=aur_db_host, user=aur_db_user,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue