btstack/doc/manual/update_mkdocs_yml.sh

18 lines
349 B
Bash
Raw Normal View History

2020-10-06 09:52:23 +00:00
#!/usr/bin/env sh
# get commit and tag
2020-10-08 07:58:00 +00:00
tag=`git tag --points-at HEAD`
2020-10-06 09:52:23 +00:00
commit=`git rev-parse --short HEAD`
branch=`git branch | sed -n -e 's/^\* \(.*\)/\1/p'`
2020-10-06 09:52:23 +00:00
# use tag if available
if [ -z "$tag" ]
then
version="$branch-$commit"
2020-10-06 09:52:23 +00:00
else
version=$tag
fi
# create mkdocs-temp.yml
sed -e "s|VERSION|$version|" mkdocs-template.yml > mkdocs-temp.yml