summaryrefslogtreecommitdiff
path: root/csv-revision
blob: 289c133b258eb8fa22497a0a61f10e133a4b0422 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

git describe --first-parent --tags 2>/dev/null | (
	IFS=- read tag rev hash
	if [ $? ] && [ -n "$rev" ]; then
		echo .$rev.$hash
	elif [ -d .git ]; then
		echo .0.gsnapshot
	fi
)