Open sylefeb opened 2 years ago
Hi. maybe adding, in compile_silice_linux.sh, something like do the job:
BRANCH=$(git branch --show-current)
if [ $BRANCH == "master" ]; then
GIT_VERS=$(git describe --tags)
else
GIT_VERS="$BRANCH-$(git rev-parse --short $(git branch --show-current))"
fi
cmake -DGIT_VERS=$GIT_VERS -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../..
Ok it's linux only but a similar piece of code may works for others OS.
A versioning approach needs to be defined:
master
branch on new versions (when merging fromwip
), where the tag is an actual version string (good practices?)--version
should display thesewip-<hash>
ordraft-<hash>