Skip to content

Commit

Permalink
Doxygen: Fix gen_doc version in html footer
Browse files Browse the repository at this point in the history
  • Loading branch information
JonatanAntoni committed Jul 20, 2023
1 parent 193243d commit 25314ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CMSIS/DoxyGen/Doxygen_Templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$darkmode
$extrastylesheet
<link href="$relpath^version.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../version.js"></script>
<script type="text/javascript" src="../../../version.js"></script>
</head>
<body>
<!--BEGIN DISABLE_INDEX-->
Expand All @@ -53,7 +53,7 @@
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber"><script type="text/javascript">
<!--
writeHeader.call(this);
writeVersionDropdown.call(this, "$projectname");
writeVersionDropdown.call(this);
//-->
</script>
</span><!--END PROJECT_NUMBER-->
Expand Down
5 changes: 4 additions & 1 deletion CMSIS/DoxyGen/gen_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 25314ca

Please sign in to comment.