From 94e09df869c8e6a6ed739a94fbca54348b51705f Mon Sep 17 00:00:00 2001 From: Loys Ollivier Date: Tue, 7 Nov 2017 09:49:23 +0100 Subject: Fix AGL build version Fix the defaulted build version if not set from command line. Change-Id: Ia61dca57abad29cd9e1305bfead15e75c81e06f4 Signed-off-by: Loys Ollivier --- utils/agljobtemplate.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/agljobtemplate.py b/utils/agljobtemplate.py index b4d44af..be46e92 100644 --- a/utils/agljobtemplate.py +++ b/utils/agljobtemplate.py @@ -94,6 +94,10 @@ class Agljobtemplate(object): # If not a full url, read from config file url_base, infra = parse_url_file(self._template_path, 'default.cfg', url) if infra == 'AGL': + # If not set, create a build_version from other args + if (not build_version) and (url_branch) and (url_version): + build_version = 'AGL-' + url + '-' + url_branch + '-' + url_version + url_fragment = '' if (url != 'default'): url_fragment += url_branch + '/' + url_version + '/' @@ -112,9 +116,6 @@ class Agljobtemplate(object): job['test_templates'] = test_templates - if (not build_version) and (url_branch) and (url_version): - build_version = 'AGL-' + url + '-' + url_branch + '-' + url_version - if build_version is not None: job['kernel_version'] = build_version -- cgit 1.2.3-korg