if cfg.LOCAL.archive_dir == "default":
cfg.LOCAL.archive_dir = os.path.abspath( osJoin(cfg.VARS.salometoolsway, "..", "ARCHIVES"))
+ # if the sat tag was not set permanently by user
+ if cfg.LOCAL.tag == None:
+ # get the tag with git, and store it
+ sat_version=src.system.git_describe(cfg.VARS.salometoolsway)
+ if sat_version == False:
+ sat_version=cfg.INTERNAL.sat_version
+ cfg.LOCAL.tag=sat_version
+
+
# apply overwrite from command line if needed
for rule in self.get_command_line_overrides(options, ["LOCAL"]):
exec('cfg.' + rule) # this cannot be factorized because of the exec
projects_cfg.PROJECTS.projects[project_name]=project_cfg
projects_cfg.PROJECTS.projects[project_name]["file_path"] = \
project_pyconf_path
+ # store the project tag if any
+ product_project_git_tag = src.system.git_describe(os.path.dirname(project_pyconf_path))
+ if product_project_git_tag:
+ projects_cfg.PROJECTS.projects[project_name]["git_tag"] = product_project_git_tag
+ else:
+ projects_cfg.PROJECTS.projects[project_name]["git_tag"] = "unknown"
merger.merge(cfg, projects_cfg)
: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
+ return config.LOCAL.tag
+
def get_salome_version(config):
import versionMinorMajorPatch as VMMP
# get salomeTool version
prod_info.sat_version = src.get_salometool_version(config)
- # get the product project git tag, if any
- product_project_git_tag = src.system.git_describe(os.path.dirname(prod_info.from_file))
- if product_project_git_tag:
- prod_info.sat_project_tag = product_project_git_tag
- else:
- prod_info.sat_project_tag = "unknown"
-
# merge opt_depend in depend
if prod_info is not None and 'opt_depend' in prod_info:
for depend in prod_info.opt_depend: