Diga que a joia é abcd
O git hook será
File: .git/hooks/post-commit
#! /bin/bash
version=`git diff HEAD^..HEAD -- "$(git rev-parse --show-toplevel)"/lib/abcd/version.rb | grep '^+.*VERSION =' | sed -E 's/[^0-9.]//g'`
if [ "$version" != "" ]; then
git tag -a "v$version" -m "`git log -1 --format=%s`"
echo "Created a new tag, v$version"
fi
Inspirado em https://coderwall.com/p/mk18zq 🙂