From 502a8c83a919ff9ecb33f3082bfb21cf41df343e Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Wed, 21 Oct 2020 10:06:34 +0300 Subject: [PATCH] update-gh-pages.sh: create 'stable' symlink Create/update a symlink to the documentation of the latest released version (if one exists). --- scripts/github/update-gh-pages.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/github/update-gh-pages.sh b/scripts/github/update-gh-pages.sh index eb08383b3..15e558279 100755 --- a/scripts/github/update-gh-pages.sh +++ b/scripts/github/update-gh-pages.sh @@ -103,6 +103,9 @@ fi # Switch to work in the gh-pages worktree cd "$build_dir" +_stable=`(ls -d1 v*/ || :) | sort -n | tail -n1` +[ -n "$_stable" ] && ln -sfT "$_stable" stable + if [ -z "`git status --short`" ]; then echo "No new content, gh-pages branch already up-to-date" exit 0