diff options
author | Tom Grennan <tgrennan@vyatta.com> | 2007-09-17 13:48:00 -0700 |
---|---|---|
committer | Tom Grennan <tgrennan@vyatta.com> | 2007-09-17 13:48:00 -0700 |
commit | 42b11e866ee4cfc20059d5a1ad36c8eda3ba1ef9 (patch) | |
tree | da28271d10c3b3853f1f44b15dd9026f74edc5ff /mkversion | |
parent | fa8e338856c90cd72f08a873b6003c2f568f530e (diff) | |
download | vyatta-op-42b11e866ee4cfc20059d5a1ad36c8eda3ba1ef9.tar.gz vyatta-op-42b11e866ee4cfc20059d5a1ad36c8eda3ba1ef9.zip |
add git VERSION reference to docs
Diffstat (limited to 'mkversion')
-rwxr-xr-x | mkversion | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mkversion b/mkversion new file mode 100755 index 0000000..03c1af1 --- /dev/null +++ b/mkversion @@ -0,0 +1,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 |