Browse Source

set_versions: Handle dev branch in switchers correctly

The dev branch is being displayed in switchers under two different
headings, 4.0.999 and dev (4.0). Add an additional conditional to fix that.

(From yocto-docs rev: 569815ac290f53a17330e53fb46c4870d8d247d2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie 3 năm trước cách đây
mục cha
commit
f7d8533664
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      documentation/set_versions.py

+ 1 - 1
documentation/set_versions.py

@@ -220,7 +220,7 @@ with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switch
                     version = version + "." + versions[-1]
                 versions.append(version)
                 w.write("    '%s': '%s',\n" % (version, version))
-            if ourversion not in versions:
+            if ourversion not in versions and ourbranch != devbranch:
                 w.write("    '%s': '%s',\n" % (ourversion, ourversion))
         else:
             w.write(line)