From 943b6bc9769a03e967f08d8b46bd975e2e8d2a20 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 5 Jun 2014 17:19:19 +0200 Subject: 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 --- scripts/git-integration/git-serve.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/git-integration/git-serve.py') diff --git a/scripts/git-integration/git-serve.py b/scripts/git-integration/git-serve.py index 08132f2..e621677 100755 --- a/scripts/git-integration/git-serve.py +++ b/scripts/git-integration/git-serve.py @@ -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, -- cgit v1.2.3-70-g09d2