From 414720709bd11d6919007fdb99e3036645f7eff2 Mon Sep 17 00:00:00 2001 From: Simon Lackerbauer Date: Sat, 21 Oct 2017 11:15:25 +0200 Subject: gitlab-module: fix hooks links for older repositories --- nixos/modules/services/misc/gitlab.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nixos') diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index 14c184c3d68..1399a36ffee 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -632,6 +632,11 @@ in { touch "${cfg.statePath}/db-seeded" fi + # The gitlab:shell:create_hooks task seems broken for fixing links + # so we instead delete all the hooks and create them anew + rm ${cfg.statePath}/repositories/**/*.git/hooks + ${gitlab-rake}/bin/gitlab-rake gitlab:shell:create_hooks RAILS_ENV=production + # Change permissions in the last step because some of the # intermediary scripts like to create directories as root. chown -R ${cfg.user}:${cfg.group} ${cfg.statePath} -- cgit 1.4.1