diff options
Diffstat (limited to 'hooks/post-commit')
| -rwxr-xr-x | hooks/post-commit | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hooks/post-commit b/hooks/post-commit new file mode 100755 index 0000000..d9831b5 --- /dev/null +++ b/hooks/post-commit @@ -0,0 +1,9 @@ +#!/bin/sh + +generation_id=$(home-manager generations | awk -e 'NR==1 { print $5 }') +generation_tag="generation-$generation_id" + +if ! git rev-parse "$generation_tag" > /dev/null 2>&1; then + echo "tagging $generation_tag" + git tag "$generation_tag" +fi |
