@@ -18,20 +18,13 @@ import os
import itertools
import re
-ourversion = None
-if len(sys.argv) == 2:
- ourversion = sys.argv[1]
-
-ourversion = None
-if len(sys.argv) == 2:
- ourversion = sys.argv[1]
-
+# Order matters: most recent to least recent
activereleases = ["whinlatter", "scarthgap", "kirkstone"]
devbranch = "wrynose"
ltsseries = ["wrynose", "scarthgap", "kirkstone"]
# used by run-docs-builds to get the default page
-if ourversion == "getlatest":
+if len(sys.argv) > 1 and sys.argv[1] == "getlatest":
print(activereleases[0])
sys.exit(0)
@@ -96,6 +89,7 @@ poky_mapping = {
"3.1" : "23.0",
}
+ourversion = None
ourseries = None
ourbranch = None
bitbakeversion = None
The following commit will make it unneeded to pass the version to the script directly, as it will be automatically deduced no matter which branch we're on. We can therefore the ourversion assignment. We still want the "getlatest" special argument, so read it from sys.argv directly. Add a comment mentioning that the order here is important for getlatest to work. Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- documentation/set_versions.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)