1#!/usr/bin/env sh 2 3# get commit and tag 4tag=`git tag --points-at HEAD` 5commit=`git rev-parse --short HEAD` 6branch=`git branch | sed -n -e 's/^\* \(.*\)/\1/p'` 7 8# use tag if available 9if [ -z "$tag" ] 10then 11 version="$branch-$commit" 12else 13 version=$tag 14fi 15 16# create mkdocs-temp.yml 17sed -e "s|VERSION|$version|" mkdocs-template.yml > mkdocs-temp.yml 18