13 lines
461 B
Bash
Executable File
13 lines
461 B
Bash
Executable File
#!/usr/bin/env bash
|
|
gitBranch="`git symbolic-ref --short -q HEAD`"
|
|
gitVersion="`git describe --tags --always`"
|
|
gitLatesttag="`echo $gitVersion | sed 's/-.*//'`"
|
|
gitLatesttagdistance="`echo $gitVersion | sed 's/.*-\(.*\)-g.*/\1/'`"
|
|
gitChangeset="`git rev-parse --verify HEAD`"
|
|
|
|
echo "set(GIT_BRANCH $gitBranch)
|
|
set(GIT_VERSION $gitLatesttag.$gitLatesttagdistance)
|
|
set(GIT_CHANGESET $gitChangeset)
|
|
set(GIT_TAGDISTANCE $gitLatesttagdistance)" > ReleaseInfo.cmake
|
|
|