Set GIT_HEAD and GIT_DESCRIBE via environmental variables 107/head
authorAlf Gaida <agaida@siduction.org>
Tue, 17 Feb 2015 22:58:32 +0000 (23:58 +0100)
committerAlf Gaida <agaida@siduction.org>
Tue, 17 Feb 2015 23:12:23 +0000 (00:12 +0100)
commit59695317b057f47ce620e99ac368e3b9b0accf8a
tree6e6e5bc34aa0f80b9eefeb0d5eb19520b24ab982
parent2d34cee94202d11702881ddcd7bf80717f87f8c3
Set GIT_HEAD and GIT_DESCRIBE  via environmental variables

Set GIT_HEAD and GIT_DESCRIBE before run cmake in case no source repo is
available - booth values must be extracted at clone/pull time

Example:
git log -1 | grep commit | sed 's#commit ##' > debian/git_head; \
git describe > debian/git_describe

export GIT_HEAD=$(shell [ -f debian/git_head ] && cat debian/git_head)
CMakeLists.txt