From 42b11e866ee4cfc20059d5a1ad36c8eda3ba1ef9 Mon Sep 17 00:00:00 2001 From: Tom Grennan Date: Mon, 17 Sep 2007 13:48:00 -0700 Subject: add git VERSION reference to docs --- .gitignore | 2 ++ debian/docs | 1 + mkversion | 10 ++++++++++ 3 files changed, 13 insertions(+) create mode 100755 mkversion diff --git a/.gitignore b/.gitignore index 7a5889d..8578ae8 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ /INSTALL /Makefile.in /Makefile +/VERSION + diff --git a/debian/docs b/debian/docs index 50bd824..0e14f42 100644 --- a/debian/docs +++ b/debian/docs @@ -1,2 +1,3 @@ NEWS README +VERSION 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 -- cgit v1.2.3