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 ED4FEC433F5 for ; Fri, 18 Mar 2022 16:27:02 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.web08.11623.1647620821615556323 for ; Fri, 18 Mar 2022 09:27:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=BUScRvjT; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.42, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f42.google.com with SMTP id r10so12437103wrp.3 for ; Fri, 18 Mar 2022 09:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=bTv0/V4NlCFUBNCBoCNd1H9sBwVho0RxI3BnJ2f+lGM=; b=BUScRvjTJANqwM4UET38HLGPamJzItFkz0gf1cG6F0EsGNuY4pODHVHYoq+9A1ALoT k26l6wkeqYILMZAelneFXrC8M+cFTf6vicdYqAf1IF/yhkrvX9W+Q3b1b8OwCgaBbRif aQP2PNKkF37ydLQJEeTsculsbj8QVd2VzQg4A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=bTv0/V4NlCFUBNCBoCNd1H9sBwVho0RxI3BnJ2f+lGM=; b=KqHuNVbyxawAu//rsBVblCAJdQvHko+OFyx7b90blbeNHfSkljkcVtQA/UWMX9JyBu oAtgMOHQnFWrrqOU5D/aXLdnZ/afIke5GlO4/xbuD6e38GhTR84LqnDI/kZOYitgf6n2 ypU4T/5yt4sytlXfbxHXAFcxjnj/QPbyDq/V9pveKv/nasJM9vCxL/BMqNw3rhYAHBWs 1oeVr5Co1rBJm8k4XJyDK1uz4w2001vPukCLXKAiSUspV7aFCZf9L7s9aj0iM+kc1NrA G7iHUQ2pDCoPSCT9HaalzQYNsn0Nd+6ueXvdGye+y8THQkhQYuc2zvC/dL/gyQFIrc/r xwwg== X-Gm-Message-State: AOAM5335MWJrPA/PU80YEsUeXN0fTqH9BuCCPNhmdb+kTk1TNIZ4rgnB zvKkYB7ethTPI9vJPWZ6BQOgTIi/6g6+FISQ X-Google-Smtp-Source: ABdhPJwuU/3U156Jpqb3GF+Eb60cdi1BJHdPAxRZ7rA8BTly/V07SY2YmAABWakIuHBQuAEKDlS7YA== X-Received: by 2002:adf:d235:0:b0:203:e45b:bef5 with SMTP id k21-20020adfd235000000b00203e45bbef5mr8218922wrh.431.1647620819787; Fri, 18 Mar 2022 09:26:59 -0700 (PDT) Received: from ?IPv6:2001:8b0:aba:5f3c:ac92:797e:3dcd:ed37? ([2001:8b0:aba:5f3c:ac92:797e:3dcd:ed37]) by smtp.gmail.com with ESMTPSA id l12-20020a056000022c00b00203ee262d12sm3547316wrz.116.2022.03.18.09.26.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Mar 2022 09:26:59 -0700 (PDT) Message-ID: <5411924015c8a723fde5bd473832b0d0cbf8f68f.camel@linuxfoundation.org> Subject: Re: [docs] [PATCH] set_versions/switchers.js: Allow switchers.js version information to be autogenerated From: Richard Purdie To: docs@lists.yoctoproject.org Date: Fri, 18 Mar 2022 16:26:56 +0000 In-Reply-To: <16DD8635B8B3D2FB.17931@lists.yoctoproject.org> References: <16DD8635B8B3D2FB.17931@lists.yoctoproject.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4-1ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 ; Fri, 18 Mar 2022 16:27:02 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/2640 On Fri, 2022-03-18 at 16:23 +0000, Richard Purdie via lists.yoctoproject.org wrote: > A horrible blunt hammer approach to updating the version information in > switchers.js based on the available tag information. > > To merge and work correctly, this will need a change to the autobuilder-helper > docs generation code to pull the swicthers.js and script from master, then > to run the script. That should hopefully remove the need for other patching > even on old docs branches though. > > Signed-off-by: Richard Purdie > --- > documentation/.gitignore | 1 + > documentation/set_versions.py | 21 +++++++++++++++++++ > .../{switchers.js => switchers.js.in} | 8 +------ > 3 files changed, 23 insertions(+), 7 deletions(-) > rename documentation/sphinx-static/{switchers.js => switchers.js.in} (97%) This patch goes a step further and automates the version information inside switchers.js, making set_versions in master definitive for version info. The actively displayed releases on the website are then simply controlled by the activereleases line at the top of the script. Updating autobuilder-helper to use this shouldn't be too hard, it should just be a case of pulling the script and switchers.js from master, then running the script. This has not yet been tested with older versions so we need to compare the results before and after to double check all the values/magic is correct. I did just think of a bug where a release not in switchers.js wouldn't be added and should be (as in older releases). I'll add something for that. Cheers, Richard