]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
sat #18867 : pour les url des bases git : substitution des references par leur valeur...
authorcrouzet <nicolas.crouzet@cea.fr>
Thu, 18 Feb 2021 12:46:48 +0000 (13:46 +0100)
committercrouzet <nicolas.crouzet@cea.fr>
Thu, 18 Feb 2021 12:46:48 +0000 (13:46 +0100)
commands/package.py

index 0d73bfcb501566b2004fd76ea827c878d9c09d8b..180fb47495ed2a28f866fb45a1fcf32693a79e12 100644 (file)
@@ -1139,6 +1139,16 @@ def find_product_scripts_and_pyconf(p_name,
                     product_pyconf_cfg[section].archive_info.archive_name =\
                         p_info.name + ".tgz"
     
+    if (with_vcs) and src.product.product_is_vcs(p_info):
+        # in vcs mode we must replace explicitely the git server url
+        # (or it will not be found later because project files are not exported in archives)
+        for section in product_pyconf_cfg:
+            # replace in all sections of the product pyconf the git repo definition by its substitued value (found in p_info)
+            if "git_info" in product_pyconf_cfg[section]:
+                for repo in product_pyconf_cfg[section].git_info:
+                    if repo in p_info.git_info:
+                        product_pyconf_cfg[section].git_info[repo] =  p_info.git_info[repo]
+
     # write the pyconf file to the temporary project location
     product_tmp_pyconf_path = os.path.join(products_pyconf_tmp_dir,
                                            p_name + ".pyconf")