X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2F__init__.py;h=ca569a05d6a89c5f85857af4e7e7a1dfbab07376;hb=d828b7da029994130b3717855155e49d58ee87ea;hp=dd6d6464f989c8de181a382bf2b5b53d7eaca958;hpb=4eab25e0f80a6d387c1cfff29b25b4aec68f152c;p=tools%2Fsat.git diff --git a/src/__init__.py b/src/__init__.py index dd6d646..ca569a0 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -147,7 +147,7 @@ def getProductNames(cfg, wildcards, logger): if len(filtered) > 0: res.append(prod) ok = True - break + continue if not ok: notFound[wild] = None if len(res) == 0: @@ -228,6 +228,22 @@ def get_log_path(config): return log_dir_path +def get_salometool_version(config): + """Return the salomeTool version. + + :param config Config: The global Config instance. + :return: the description of this version of sat in terms of tag and commit + """ + # we use : + # config.VARS.salometoolsway : the full path of salomeTool + # config.INTERNAL.sat_version : the static salomeTool version, + # in case we are not in a git repo + sat_version=system.git_describe(config.VARS.salometoolsway) + if sat_version == False: + return config.INTERNAL.sat_version + else: + return sat_version + def get_salome_version(config): import versionMinorMajorPatch as VMMP