Skip to content

Commit 7f5159f

Browse files
committed
Update latest version number during generation of documentation
1 parent 5eaaf05 commit 7f5159f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/publish-older-minor-gh-pages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
echo "Documentation branch is $GITHUB_REF_NAME..."
4747
minor_version=${GITHUB_REF_NAME#"release/"}
4848
echo "Building documentation for older minor version..."
49+
latest_tag=$(git ls-remote https://github.com/oracle/weblogic-kubernetes-operator.git --h --sort origin "refs/tags/v*" | cut -f2 | grep v$minor_version | tail -1 | cut -c12-)
50+
echo "Latest tag is $latest_tag..."
51+
echo $latest_tag >| $GITHUB_WORKSPACE/branch/documentation/site/layouts/shortcodes/latestVersion.html
4952
hugo -s site -d "$GITHUB_WORKSPACE/WORK/$minor_version" -b https://oracle.github.io/weblogic-kubernetes-operator/$minor_version
5053
cd $GITHUB_WORKSPACE/gh-pages
5154
rm -Rf $minor_version

0 commit comments

Comments
 (0)