From 25314cac3c6f180ceefc82062c7a6735db3b9365 Mon Sep 17 00:00:00 2001 From: Jonatan Antoni Date: Thu, 20 Jul 2023 15:12:26 +0200 Subject: [PATCH] Doxygen: Fix gen_doc version in html footer --- CMSIS/DoxyGen/Doxygen_Templates/header.html | 4 ++-- CMSIS/DoxyGen/gen_doc.sh | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) 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')