From: SPN Salome - CEA Date: Wed, 28 Jun 2017 09:32:23 +0000 (+0200) Subject: filter .git and .svn directories in .tgz sources. See https://codev-tuleap.cea.fr... X-Git-Tag: V8_3_0~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=17ca392826d4958d717c5e3f88dce5fc308479f4;p=tools%2Fsat.git filter .git and .svn directories in .tgz sources. See https://codev-tuleap.cea.fr/plugins/tracker/?aid=8517 --- diff --git a/commands/package.py b/commands/package.py index 5b18d13..6a6862e 100644 --- a/commands/package.py +++ b/commands/package.py @@ -747,7 +747,9 @@ def make_archive(prod_name, prod_info, where): path_targz_prod = os.path.join(where, prod_name + ".tgz") tar_prod = tarfile.open(path_targz_prod, mode='w:gz') local_path = prod_info.source_dir - tar_prod.add(local_path, arcname=prod_name) + tar_prod.add(local_path, + arcname=prod_name, + exclude=exclude_VCS_and_extensions) tar_prod.close() return path_targz_prod @@ -1302,7 +1304,6 @@ def run(args, runner, logger): tar = tarfile.open(path_targz, mode='w:gz') # get the filtering function if needed - filter_function = None filter_function = exclude_VCS_and_extensions # Add the files to the tarfile object