2021-05-25 06:53:22 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
# get commit and tag
|
|
|
|
tag=`git tag --points-at HEAD`
|
|
|
|
commit=`git rev-parse --short HEAD`
|
2021-05-27 14:55:56 +00:00
|
|
|
branch=`git branch | sed -n -e 's/^\* \(.*\)/\1/p'`
|
2021-05-25 06:53:22 +00:00
|
|
|
|
|
|
|
# use tag if available
|
|
|
|
if [ -z "$tag" ]
|
|
|
|
then
|
2021-05-27 14:55:56 +00:00
|
|
|
version="$branch-$commit"
|
2021-05-25 06:53:22 +00:00
|
|
|
else
|
2021-05-25 07:03:33 +00:00
|
|
|
version="Version $tag ($commit)"
|
2021-05-25 06:53:22 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# create mkdocs.yml
|
2021-05-28 13:35:09 +00:00
|
|
|
sed -e "s|VERSION|$version|" btstack_gettingstarted.tex > $1/btstack_gettingstarted.tex
|