From 17ca392826d4958d717c5e3f88dce5fc308479f4 Mon Sep 17 00:00:00 2001 From: SPN Salome - CEA Date: Wed, 28 Jun 2017 11:32:23 +0200 Subject: [PATCH] filter .git and .svn directories in .tgz sources. See https://codev-tuleap.cea.fr/plugins/tracker/?aid=8517 --- commands/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.2