1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-17 18:50:11 +02:00

Make sure that for per-version src tarballs, VCS dirs are really excluded.

A full path is passed to the filter function, so old code didn't really work.
This commit is contained in:
Paul Sokolovsky 2012-02-24 14:38:13 +02:00
parent ce1deec8dd
commit a348106f03

View File

@ -139,8 +139,9 @@ def build_local(app, thisbuild, build_dir, output_dir):
tarball = tarfile.open(os.path.join(tmp_dir,
tarname + '.tar.gz'), "w:gz")
def tarexc(f):
if f in ['.svn', '.git', '.hg', '.bzr']:
return True
for vcs_dir in ['.svn', '.git', '.hg', '.bzr']:
if f.endswith(vcs_dir):
return True
return False
tarball.add(build_dir, tarname, exclude=tarexc)
tarball.close()