mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03: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:
commit
b254472a99
1 changed files with 3 additions and 3 deletions
|
|
@ -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...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue