summaryrefslogtreecommitdiff
path: root/mkversion
blob: 03c1af1f7850a5428cbd7753601f27bdf0d6576b (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash

# Make GIT version reference file

url=$( git repo-config --get remote.origin.url )
test -z "$url" && url=file://$PWD
branch=$( git-branch --no-color | sed '/^\* /!d; s/^\* //' )
sha=$( git log --pretty=oneline --no-color -n 1 | cut -c-8 )

echo "${url}#${branch}-${sha}" > VERSION