Mercurial > repos > petrn > repeatexplorer
annotate get_version.sh @ 4:0f9dfaada8ef draft
Uploaded
author | petrn |
---|---|
date | Fri, 20 Dec 2019 12:32:17 +0000 |
parents | 94877d063270 |
children |
rev | line source |
---|---|
2 | 1 #!/bin/sh |
2 # this file is copied into ./git/hooks.post-commit and post-checkout | |
3 branch=$(git rev-parse --abbrev-ref HEAD) | |
4 shorthash=$(git log --pretty=format:'%h' -n 1) | |
5 revcount=$(git log --oneline | wc -l) | |
6 tag=$(git describe --tags --abbrev=0) | |
7 echo "version:" ${tag}"-"${revcount}"("$shorthash") branch:" $branch > version_info.txt | |
8 |