2016-12-23 00:01:21 +08:00
|
|
|
|
|
|
|
# version for configure
|
2017-06-06 17:41:32 +08:00
|
|
|
# echo -n `git describe --abbrev=4`
|
2016-12-23 00:01:21 +08:00
|
|
|
|
|
|
|
# version for make dist
|
|
|
|
git describe --abbrev=4 > .version
|
|
|
|
git describe --abbrev=4 > .tarball-version
|
|
|
|
|
|
|
|
# git commit for IPC
|
2017-06-06 17:41:32 +08:00
|
|
|
echo "#define REEF_TAG \"`git describe --abbrev=4 | cut -d- -f3`\"" > src/include/version.h
|
|
|
|
|
|
|
|
# build counter
|
|
|
|
if [ -e .build ]; then
|
|
|
|
num=$((`cat .build` + 1))
|
|
|
|
else
|
|
|
|
num=0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# save and insert build counter
|
|
|
|
echo $num > .build
|
|
|
|
echo "#define REEF_BUILD $num" >> src/include/version.h
|
|
|
|
|