From 55feeb65f3197035cc0cc54be84316719892c109 Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Mon, 2 Oct 2023 19:13:13 +0200 Subject: [PATCH] Add new release branch to docs versions [noissue] (cherry picked from commit 03ef150773e78a09a8c92e748ffe9d1684324515) --- .ci/scripts/create_release_branch.sh | 3 +++ docs_theme/main.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.ci/scripts/create_release_branch.sh b/.ci/scripts/create_release_branch.sh index c76bd625f..e4f5073f1 100755 --- a/.ci/scripts/create_release_branch.sh +++ b/.ci/scripts/create_release_branch.sh @@ -23,6 +23,9 @@ git branch "${NEW_BRANCH}" # Clean changelog snippets. find CHANGES/ \( -name "*.feature" -o -name "*.bugfix" -o -name "*.doc" -o -name "*.translation" -o -name "*.devel" -o -name "*.misc" \) -exec git rm -f \{\} + +# Add to version.txt +sed -i -e "1 i \\${NEW_BRANCH}" docs/versions.txt + bumpversion minor --commit --message $'Bump version to {new_version}\n\n[noissue]' --allow-dirty git push origin "${NEW_BRANCH}" diff --git a/docs_theme/main.html b/docs_theme/main.html index 7091ff9e5..278f8b4b0 100644 --- a/docs_theme/main.html +++ b/docs_theme/main.html @@ -34,7 +34,7 @@ {% if config.theme.version.endswith("dev") -%} version_select.value = ""; {% else -%} - version_select.value = "{{ config.theme.version }}"; + version_select.value = "{{ config.theme.version }}".match("[0-9]+\.[0-9]+")[0]; {% endif -%} version_select.onchange = function(event) { window.location = "{{ prefix }}{{ '.'|url }}" + event.target.value }; })