Commit b254472a authored by Hans-Christoph Steiner's avatar Hans-Christoph Steiner

Merge branch 'exclude-filter' into 'master'

build: replace exclude with filter during source tar creation

Closes #531

See merge request !538
parents de5455e2 7bdffde8
Pipeline #29464329 failed with stage
in 19 minutes and 5 seconds
......@@ -569,9 +569,9 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
tarname = common.getsrcname(app, build)
tarball = tarfile.open(os.path.join(tmp_dir, tarname), "w:gz")
def tarexc(f):
return any(f.endswith(s) for s in ['.svn', '.git', '.hg', '.bzr'])
tarball.add(build_dir, tarname, exclude=tarexc)
def tarexc(t):
return None if any(t.name.endswith(s) for s in ['.svn', '.git', '.hg', '.bzr']) else t
tarball.add(build_dir, tarname, filter=tarexc)
tarball.close()
# Run a build command if one is required...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment