Support a global exclude file for zip creation.

This commit is contained in:
James Turner
2015-07-30 12:04:17 -05:00
parent f61ceb1293
commit 479a175587
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -161,7 +161,7 @@ class PackageData:
if not os.path.exists(os.path.join(self._path, t)):
raise RuntimeError("missing thumbnail:" + t);
def generateZip(self, outDir):
def generateZip(self, outDir, globalExcludePath):
self._revision = self._previousRevision + 1
zipName = self.id + ".zip"
@@ -173,6 +173,9 @@ class PackageData:
# anything we can do to make this faster?
zipArgs = ['zip', '--quiet', '-r']
if os.path.exists(globalExcludePath):
zipArgs += [ "-x@" + globalExcludePath]
excludePath = os.path.join(self.path, 'package-exclude.lst')
if (os.path.exists(excludePath)):
print self.id, "has zip exclude list"