1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-19 21:30:10 +01:00

Merge branch 'exclude-filter' into 'master'

build: replace exclude with filter during source tar creation

Closes #531

See merge request fdroid/fdroidserver!538
This commit is contained in:
Hans-Christoph Steiner 2018-09-05 12:39:23 +00:00
commit b254472a99

View File

@ -569,9 +569,9 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
tarname = common.getsrcname(app, build) tarname = common.getsrcname(app, build)
tarball = tarfile.open(os.path.join(tmp_dir, tarname), "w:gz") tarball = tarfile.open(os.path.join(tmp_dir, tarname), "w:gz")
def tarexc(f): def tarexc(t):
return any(f.endswith(s) for s in ['.svn', '.git', '.hg', '.bzr']) return None if any(t.name.endswith(s) for s in ['.svn', '.git', '.hg', '.bzr']) else t
tarball.add(build_dir, tarname, exclude=tarexc) tarball.add(build_dir, tarname, filter=tarexc)
tarball.close() tarball.close()
# Run a build command if one is required... # Run a build command if one is required...