aboutsummaryrefslogtreecommitdiff
path: root/hooks/post-commit
blob: d9831b5ecf1cc5d3698ecaa0eb5123f138ba9a28 (plain) (blame)
1
2
3
4
5
6
7
8
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