diff --git a/CMSIS/DoxyGen/Doxygen_Templates/header.html b/CMSIS/DoxyGen/Doxygen_Templates/header.html index e8c8873f5..0807b85c2 100644 --- a/CMSIS/DoxyGen/Doxygen_Templates/header.html +++ b/CMSIS/DoxyGen/Doxygen_Templates/header.html @@ -29,7 +29,7 @@ $darkmode $extrastylesheet - + @@ -53,7 +53,7 @@   diff --git a/CMSIS/DoxyGen/gen_doc.sh b/CMSIS/DoxyGen/gen_doc.sh index 177fa5fcc..ed3550973 100755 --- a/CMSIS/DoxyGen/gen_doc.sh +++ b/CMSIS/DoxyGen/gen_doc.sh @@ -77,7 +77,10 @@ function generate() { projectName=$(grep -E "PROJECT_NAME\s+=" $1.dxy.in | sed -r -e 's/[^"]*"([^"]+)".*/\1/') projectNumberFull="$2" if [ -z "${projectNumberFull}" ]; then - projectNumberFull=$(grep -E "PROJECT_NUMBER\s+=" $1.dxy.in | sed -r -e 's/[^"]*"[^0-9]*([0-9]+\.[0-9]+(\.[0-9]+)?(-.+)?)".*/\1/') + projectNumberFull=$(grep -E "PROJECT_NUMBER\s+=" $1.dxy.in | sed -r -e 's/[^"]*"[^0-9]*(([0-9]+\.[0-9]+(\.[0-9]+)?(-.+)?)?)".*/\1/') + fi + if [ -z "${projectNumberFull}" ]; then + projectNumberFull="$(git rev-parse --short HEAD)" fi projectNumber="${projectNumberFull%+*}" datetime=$(date -u +'%a %b %e %Y %H:%M:%S')