Update 9 files
- /home/dot_config/git/template/hooks/symlink_commit-msg.tmpl - /home/dot_config/git/template/hooks/symlink_post-checkout.tmpl - /home/dot_config/git/template/hooks/symlink_post-commit.tmpl - /home/dot_config/git/template/hooks/symlink_post-merge.tmpl - /home/dot_config/git/template/hooks/symlink_post-rewrite.tmpl - /home/dot_config/git/template/hooks/symlink_pre-commit.tmpl - /home/dot_config/git/template/hooks/symlink_pre-push.tmpl - /home/dot_config/git/template/hooks/symlink_prepare-commit-msg.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_08-git-hooks.tmpl
This commit is contained in:
parent
fcb563d35f
commit
7bfe2ddbf1
9 changed files with 12 additions and 26 deletions
|
@ -11,10 +11,20 @@
|
|||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
### Ensure git hooks directory exists
|
||||
logg info 'Ensuring git hooks directory exists'
|
||||
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/git/template/hooks"
|
||||
|
||||
### Ensure git hooks are executable
|
||||
logg info 'Ensuring git hooks are executable'
|
||||
logg info 'Ensuring git hooks are up-to-date'
|
||||
find "$HOME/.local/src/shared-common/common/.config/husky" -mindepth 1 -maxdepth 1 -type f | while read HOOK; do
|
||||
chmod +x "$HOOK"
|
||||
cp "$HOOK" "${XDG_CONFIG_HOME:-$HOME/.config}/git/template/hooks"
|
||||
done
|
||||
|
||||
### Make git hooks executable
|
||||
if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/git/template/hooks" ]; then
|
||||
logg info 'Ensuring git hooks are executable'
|
||||
chmod +x "${XDG_CONFIG_HOME:-$HOME/.config}/git/template/hooks/*"
|
||||
fi
|
||||
|
||||
{{ end -}}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{{- if true -}}
|
||||
{{ .host.home }}/.local/src/shared-common/common/.config/husky/commit-msg
|
||||
{{- end -}}
|
|
@ -1,3 +0,0 @@
|
|||
{{- if true -}}
|
||||
{{ .host.home }}/.local/src/shared-common/common/.config/husky/post-checkout
|
||||
{{- end -}}
|
|
@ -1,3 +0,0 @@
|
|||
{{- if true -}}
|
||||
{{ .host.home }}/.local/src/shared-common/common/.config/husky/post-commit
|
||||
{{- end -}}
|
|
@ -1,3 +0,0 @@
|
|||
{{- if true -}}
|
||||
{{ .host.home }}/.local/src/shared-common/common/.config/husky/post-merge
|
||||
{{- end -}}
|
|
@ -1,3 +0,0 @@
|
|||
{{- if true -}}
|
||||
{{ .host.home }}/.local/src/shared-common/common/.config/husky/post-rewrite
|
||||
{{- end -}}
|
|
@ -1,3 +0,0 @@
|
|||
{{- if true -}}
|
||||
{{ .host.home }}/.local/src/shared-common/common/.config/husky/pre-commit
|
||||
{{- end -}}
|
|
@ -1,3 +0,0 @@
|
|||
{{- if true -}}
|
||||
{{ .host.home }}/.local/src/shared-common/common/.config/husky/pre-push
|
||||
{{- end -}}
|
|
@ -1,3 +0,0 @@
|
|||
{{- if true -}}
|
||||
{{ .host.home }}/.local/src/shared-common/common/.config/husky/prepare-commit-msg
|
||||
{{- end -}}
|
Loading…
Reference in a new issue