From patchwork Tue Apr 19 17:07:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 6842 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 270B8C352A7 for ; Tue, 19 Apr 2022 17:48:48 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx.groups.io with SMTP id smtpd.web09.2115.1650388071332614464 for ; Tue, 19 Apr 2022 10:07:52 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: 0leil.net, ip: 217.70.183.196, mailfrom: foss+yocto@0leil.net) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 2A9C3E0002; Tue, 19 Apr 2022 17:07:46 +0000 (UTC) From: Quentin Schulz To: yocto@lists.yoctoproject.org, docs@lists.yoctoproject.org Cc: Quentin Schulz , Quentin Schulz Subject: [RFC PATCH] docs: update Bitbake objects.inv location for master branch Date: Tue, 19 Apr 2022 19:07:24 +0200 Message-Id: <20220419170730.124287-1-foss+yocto@0leil.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 19 Apr 2022 17:48:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/56806 From: Quentin Schulz master branch of Bitbake is now located at docs.yoctoproject.org/dev instead of docs.yoctoproject.org so let's update the switchers and set_versions.py to reflect that change. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- documentation/set_versions.py | 2 +- documentation/sphinx-static/switchers.js.in | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/documentation/set_versions.py b/documentation/set_versions.py index 8ae02b11f..0086e9bea 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py @@ -128,7 +128,7 @@ else: if branch == "master": ourseries = devbranch docconfver = "dev" - bitbakeversion = "" + bitbakeversion = "dev" elif branch in release_series: ourseries = branch if branch in bitbake_mapping: diff --git a/documentation/sphinx-static/switchers.js.in b/documentation/sphinx-static/switchers.js.in index 408e23a71..4966b3033 100644 --- a/documentation/sphinx-static/switchers.js.in +++ b/documentation/sphinx-static/switchers.js.in @@ -149,11 +149,9 @@ by https://git.yoctoproject.org/yocto-autobuilder-helper/tree/scripts/run-docs-b var docroot = get_docroot_url() var new_versionpath = selected_version + '/'; - if (selected_version == "dev") - new_versionpath = ''; - // dev versions have no version prefix - if (current_version == "dev") { + // latest tag is also the default page (without version information) + if (docroot.endsWith(current_version + '/') == false) { var new_url = docroot + new_versionpath + url.replace(docroot, ""); var fallback_url = docroot + new_versionpath; } else { From patchwork Tue Apr 19 17:07:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 6844 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39C2CC47081 for ; Tue, 19 Apr 2022 17:48:48 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx.groups.io with SMTP id smtpd.web09.2117.1650388072157526648 for ; Tue, 19 Apr 2022 10:07:52 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: 0leil.net, ip: 217.70.183.196, mailfrom: foss+yocto@0leil.net) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id C4663E000A; Tue, 19 Apr 2022 17:07:49 +0000 (UTC) From: Quentin Schulz To: yocto@lists.yoctoproject.org, docs@lists.yoctoproject.org Cc: Quentin Schulz , Quentin Schulz Subject: [PATCH yocto-autobuilder-helper 2/6] scripts: run-docs-build: allow to pass buildtools script and docbook tarball paths Date: Tue, 19 Apr 2022 19:07:26 +0200 Message-Id: <20220419170730.124287-3-foss+yocto@0leil.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220419170730.124287-1-foss+yocto@0leil.net> References: <20220419170730.124287-1-foss+yocto@0leil.net> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 19 Apr 2022 17:48:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/56808 From: Quentin Schulz Currently, the path to buildtools script and docbook tarball are hardcoded to work on Yocto Project Autobuilder. However, this makes it harder to contribute to this script because it is very unlikely those paths exist on a developer PC. Instead, let's allow to override variables by using the environment and make the current hardcoded values the default ones. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- scripts/run-docs-build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/run-docs-build b/scripts/run-docs-build index 6e25549..6569928 100755 --- a/scripts/run-docs-build +++ b/scripts/run-docs-build @@ -2,6 +2,12 @@ # Called with $1 as the build directory # $2 as the path to yocto-docs # $3 as the path to bitbake +# +# Environment variables: +# - docs_buildtools as the path to buildtools script for the docs. +# Can be found here: https://autobuilder.yocto.io/pub/buildtools/ +# - docbookarchive as the path to old (pre 3.1.5 and Sphinx migration) docs tarball +# Can be found here: https://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-archives-20201105.tar.xz set -e set -u @@ -11,7 +17,7 @@ set -x builddir=$(realpath "$1") ypdocs=$(realpath "$2/documentation/") bbdocs=$(realpath "$3/doc/") -docs_buildtools=/srv/autobuilder/autobuilder.yocto.io/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.sh +docs_buildtools=${docs_buildtools:-/srv/autobuilder/autobuilder.yocto.io/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.sh} outputdir=$builddir/output scriptdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" @@ -23,7 +29,7 @@ $docs_buildtools -y -d $builddir/buildtools # Getting the old docbook built docs from an archive. Not rebuilding them. #wget https://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-archives-20201105.tar.xz -docbookarchive=/srv/autobuilder/autobuilder.yocto.io/pub/docbook-mirror/docbook-archives-20201105.tar.xz +docbookarchive=${docbookarchive:-/srv/autobuilder/autobuilder.yocto.io/pub/docbook-mirror/docbook-archives-20201105.tar.xz} mkdir $outputdir cd $outputdir echo Extracing old content from archive From patchwork Tue Apr 19 17:07:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 6845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C512C38161 for ; Tue, 19 Apr 2022 17:48:48 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx.groups.io with SMTP id smtpd.web12.2097.1650388073471337346 for ; Tue, 19 Apr 2022 10:07:54 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: 0leil.net, ip: 217.70.183.196, mailfrom: foss+yocto@0leil.net) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 19106E000B; Tue, 19 Apr 2022 17:07:50 +0000 (UTC) From: Quentin Schulz To: yocto@lists.yoctoproject.org, docs@lists.yoctoproject.org Cc: Quentin Schulz , Quentin Schulz Subject: [PATCH yocto-autobuilder-helper 3/6] scripts: run-docs-build: add option to skip upstream rsync Date: Tue, 19 Apr 2022 19:07:27 +0200 Message-Id: <20220419170730.124287-4-foss+yocto@0leil.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220419170730.124287-1-foss+yocto@0leil.net> References: <20220419170730.124287-1-foss+yocto@0leil.net> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 19 Apr 2022 17:48:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/56809 From: Quentin Schulz The rsync only makes sense for the Autobuilder as most people don't have access to docs@docs.yoctoproject.org. Therefore, to allow for easier contribution to this script, let's allow to skip the rsync so the script can continue to run. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- scripts/run-docs-build | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/run-docs-build b/scripts/run-docs-build index 6569928..a060a31 100755 --- a/scripts/run-docs-build +++ b/scripts/run-docs-build @@ -8,6 +8,7 @@ # Can be found here: https://autobuilder.yocto.io/pub/buildtools/ # - docbookarchive as the path to old (pre 3.1.5 and Sphinx migration) docs tarball # Can be found here: https://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-archives-20201105.tar.xz +# - PUBLISH (0/1) for whether the files should be rsync'ed to docs.yoctoproject.org set -e set -u @@ -20,6 +21,7 @@ bbdocs=$(realpath "$3/doc/") docs_buildtools=${docs_buildtools:-/srv/autobuilder/autobuilder.yocto.io/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.sh} outputdir=$builddir/output scriptdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" +PUBLISH=${PUBLISH:-1} cd $builddir @@ -68,10 +70,12 @@ for branch in 1.46 $(git branch --remote --contains "$first_sphinx_commit" --for git reset --hard done -# only sync bitbake folder for now. We need bitbake to be published first -# since the bitbake intersphinx index will be downloaded to build yocto-docs -cd $outputdir -rsync -irlp --checksum --ignore-times --delete bitbake docs@docs.yoctoproject.org:docs/ +if [ "$PUBLISH" -ne 0 ]; then + # only sync bitbake folder for now. We need bitbake to be published first + # since the bitbake intersphinx index will be downloaded to build yocto-docs + cd $outputdir + rsync -irlp --checksum --ignore-times --delete bitbake docs@docs.yoctoproject.org:docs/ +fi cd $ypdocs @@ -142,5 +146,7 @@ ln -s $tag $outputdir/current cd $outputdir/bitbake find . -name switchers.js -exec cp $outputdir/current/_static/switchers.js {} \; -cd $outputdir -rsync -irlp --checksum --ignore-times --delete . docs@docs.yoctoproject.org:docs/ +if [ "$PUBLISH" -ne 0 ]; then + cd $outputdir + rsync -irlp --checksum --ignore-times --delete . docs@docs.yoctoproject.org:docs/ +fi From patchwork Tue Apr 19 17:07:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 6846 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46373C47082 for ; Tue, 19 Apr 2022 17:48:48 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx.groups.io with SMTP id smtpd.web10.2026.1650388074715798100 for ; Tue, 19 Apr 2022 10:07:55 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: 0leil.net, ip: 217.70.183.196, mailfrom: foss+yocto@0leil.net) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 71A27E0009; Tue, 19 Apr 2022 17:07:52 +0000 (UTC) From: Quentin Schulz To: yocto@lists.yoctoproject.org, docs@lists.yoctoproject.org Cc: Quentin Schulz , Quentin Schulz Subject: [PATCH yocto-autobuilder-helper 4/6] scripts: run-docs-build: use set_versions.py and switchers.js.in from master Date: Tue, 19 Apr 2022 19:07:28 +0200 Message-Id: <20220419170730.124287-5-foss+yocto@0leil.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220419170730.124287-1-foss+yocto@0leil.net> References: <20220419170730.124287-1-foss+yocto@0leil.net> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 19 Apr 2022 17:48:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/56810 From: Quentin Schulz set_versions.py and switchers.js.in need to be up-to-date so that a consistent behavior is kept between different branches and tags of the documentation. Right now, kirkstone branch is lagging behind master and therefore does not have the latest changes from master (e.g. the new obsolete algorithm, which obviously isn't an issue right now, but will be in two years). Using master version for those scripts also lightens the maintenance burden. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- scripts/run-docs-build | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/run-docs-build b/scripts/run-docs-build index a060a31..8044b60 100755 --- a/scripts/run-docs-build +++ b/scripts/run-docs-build @@ -102,11 +102,9 @@ for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" -- git am "${scriptdir}/docs-build-patches/${branch}/"000* fi - git checkout master releases.rst + git checkout master releases.rst sphinx-static/switchers.js.in set_versions.py if [ -e poky.yaml ]; then - git checkout master sphinx-static/switchers.js.in cp poky.yaml poky.yaml.in - git checkout master set_versions.py case $branch in yocto-*) ./set_versions.py $(echo "$branch" | sed 's/yocto-//') From patchwork Tue Apr 19 17:07:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 6847 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52BE0C47086 for ; Tue, 19 Apr 2022 17:48:48 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx.groups.io with SMTP id smtpd.web08.2196.1650388075989292167 for ; Tue, 19 Apr 2022 10:07:56 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: 0leil.net, ip: 217.70.183.196, mailfrom: foss+yocto@0leil.net) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id A59C1E0008; Tue, 19 Apr 2022 17:07:53 +0000 (UTC) From: Quentin Schulz To: yocto@lists.yoctoproject.org, docs@lists.yoctoproject.org Cc: Quentin Schulz , Quentin Schulz Subject: [RFC PATCH yocto-autobuilder-helper 5/6] scripts: run-docs-build: make latest documentation tag the default version Date: Tue, 19 Apr 2022 19:07:29 +0200 Message-Id: <20220419170730.124287-6-foss+yocto@0leil.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220419170730.124287-1-foss+yocto@0leil.net> References: <20220419170730.124287-1-foss+yocto@0leil.net> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 19 Apr 2022 17:48:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/56811 From: Quentin Schulz Currently, the master branch is the default branch being displayed by default when reaching the Yocto docs website. When big changes are implemented for the next release, these are shown immediately to the user, even though there is currently no release available for those changes. This is an issue when e.g. behaviors are changed, new features are added, variables get renamed or some syntaxes change because the user might try to use things that aren't available to them yet. I believe more people are using released version of Yocto Project/Bitbake than people working on latest master. So let's make the default version of the docs the latest tag (in terms of version number, not date of tagging) to avoid too much confusion. The master branch of the docs is now available at /dev subpath. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- scripts/run-docs-build | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/scripts/run-docs-build b/scripts/run-docs-build index 8044b60..faba0fe 100755 --- a/scripts/run-docs-build +++ b/scripts/run-docs-build @@ -46,6 +46,9 @@ mkdir $outputdir/bitbake # We copy the releases.rst file from master so that all versions of the docs # see the latest releases. first_sphinx_commit=84ccba0f4aff91528f764523fe1205a354c889ed + +latest_branch=$(git branch --remote --contains "$first_sphinx_commit" --format '%(refname:lstrip=3)' --sort='-version:refname' | grep --max-count=1 "[0-9]*\.[0-9]*") + for branch in 1.46 $(git branch --remote --contains "$first_sphinx_commit" --format '%(refname:lstrip=3)'); do if [ "$branch" = "HEAD" ]; then continue @@ -61,7 +64,12 @@ for branch in 1.46 $(git branch --remote --contains "$first_sphinx_commit" --for branch="next" mkdir $outputdir/bitbake/$branch elif [ "$branch" = "master" ]; then + branch="dev" + mkdir $outputdir/bitbake/$branch + elif [ "$branch" = "$latest_branch" ]; then branch="" + mkdir $outputdir/bitbake/$latest_branch + cp -r ./_build/final/* $outputdir/bitbake/$latest_branch else mkdir $outputdir/bitbake/$branch fi @@ -83,6 +91,9 @@ cd $ypdocs # Again, keeping even the no longer supported releases (see above comment) first_sphinx_commit=01dd5af7954e24552aca022917669b27bb0541ed first_dunfell_sphinx_commit=c25fe058b88b893b0d146f3ed27320b47cdec236 + +latest_tag=$(git tag --contains "$first_sphinx_commit" --contains "$first_dunfell_sphinx_commit" --sort="version:refname" 'yocto-*' | tail -1 | sed 's/yocto-//') + for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" --format '%(refname:lstrip=3)') $(git tag --contains "$first_sphinx_commit" --contains "$first_dunfell_sphinx_commit" 'yocto-*') transition; do if [ "$branch" = "HEAD" ]; then continue @@ -124,7 +135,14 @@ for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" -- if [ "$branch" = "master-next" ]; then branch="next" mkdir $outputdir/$branch - elif [ "$branch" = "master" ] || [ "$branch" = "transition" ]; then + elif [ "$branch" = "master" ]; then + branch="dev" + mkdir $outputdir/$branch + elif [ "$branch" = "$latest_tag" ]; then + branch="" + mkdir $outputdir/$latest_tag + cp -r ./_build/final/* $outputdir/$latest_tag + elif [ "$branch" = "transition" ]; then branch="" else mkdir $outputdir/$branch From patchwork Tue Apr 19 17:07:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 6848 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5319DC38A04 for ; Tue, 19 Apr 2022 17:48:48 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx.groups.io with SMTP id smtpd.web12.2098.1650388077052368012 for ; Tue, 19 Apr 2022 10:07:57 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: 0leil.net, ip: 217.70.183.196, mailfrom: foss+yocto@0leil.net) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id ECEBAE0004; Tue, 19 Apr 2022 17:07:54 +0000 (UTC) From: Quentin Schulz To: yocto@lists.yoctoproject.org, docs@lists.yoctoproject.org Cc: Quentin Schulz , Quentin Schulz Subject: [RFC PATCH yocto-autobuilder-helper 6/6] scripts: run-docs-build: reuse logic to link to latest tag Date: Tue, 19 Apr 2022 19:07:30 +0200 Message-Id: <20220419170730.124287-7-foss+yocto@0leil.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220419170730.124287-1-foss+yocto@0leil.net> References: <20220419170730.124287-1-foss+yocto@0leil.net> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 19 Apr 2022 17:48:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/56812 From: Quentin Schulz Since the latest tag already has a specific handling in the forloop, let's just move the symlink creation inside the forloop. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- scripts/run-docs-build | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/run-docs-build b/scripts/run-docs-build index faba0fe..ecc5332 100755 --- a/scripts/run-docs-build +++ b/scripts/run-docs-build @@ -142,6 +142,8 @@ for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" -- branch="" mkdir $outputdir/$latest_tag cp -r ./_build/final/* $outputdir/$latest_tag + echo Linking to $latest_tag as current + ln -s $latest_tag $outputdir/current elif [ "$branch" = "transition" ]; then branch="" else @@ -153,11 +155,6 @@ for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" -- git clean -f done -# get current release (e.g. most recent tag), and add a 'current' link -tag=$(git tag --list 'yocto-*' | sort --version-sort | tail -1 | cut -c7-) -echo Linking to $tag as current -ln -s $tag $outputdir/current - # Update bitbake switchers.js with the copy from master ypdocs cd $outputdir/bitbake find . -name switchers.js -exec cp $outputdir/current/_static/switchers.js {} \;