major-or-minor.sh
January 23, 2015 · View on GitHub
git checkout
(git show-ref -d
(git describe --abbrev=0) |\ # grab the most recent tag
tail -n1 |\
awk '{print \1}'\ # dereference the commit hash it refers to
)\ # ... show the tree-hash it points at
) -- test # check that version's "test/" directory out into cwd
make test # if this fails, you should bump major,
# otherwise bump minor or patch.