gitlab-module: fix hooks links for older repositories

This commit is contained in:
Simon Lackerbauer 2017-10-21 11:15:25 +02:00 committed by Robin Gloster
parent d1c8c04ea6
commit 414720709b
No known key found for this signature in database
GPG Key ID: D5C458DF6DD97EDF

View File

@ -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}