Skip to content

Commit

Permalink
build: create a latest.html ReSpec version
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Ralphson <[email protected]>
  • Loading branch information
MikeRalphson committed May 17, 2021
1 parent b2b1c16 commit 3e89efa
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions scripts/md2html/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@ mkdir -p deploy/js
cd scripts/md2html
mkdir -p history
git show c740e950d:MAINTAINERS.md > history/MAINTAINERS_v2.0.md
cp -p js/* ../../deploy/js
cp -p markdown/* ../../deploy/
cp -p js/* ../../deploy/js 2> /dev/null
cp -p markdown/* ../../deploy/ 2> /dev/null

node md2html.js --respec --maintainers ./history/MAINTAINERS_v2.0.md ../../versions/2.0.md > ../../deploy/oas/v2.0.html

latest=`git describe --abbrev=0 --tags`
for filename in ../../versions/[3456789].*.md ; do
node md2html.js --respec --maintainers ../../MAINTAINERS.md ${filename} > ../../deploy/oas/v$(basename "$filename" .md).html
version=$(basename "$filename" .md)
node md2html.js --respec --maintainers ../../MAINTAINERS.md ${filename} > ../../deploy/oas/v$version.html
if [ $version = $latest ]; then
if [[ ${version} != *"rc"* ]];then
# version is not a Release Candidate
cp -p ../../deploy/oas/v$version.html ../../deploy/oas/latest.html
fi
fi
done

0 comments on commit 3e89efa

Please sign in to comment.