Support a global exclude file for zip creation.
This commit is contained in:
parent
f61ceb1293
commit
479a175587
2 changed files with 6 additions and 2 deletions
|
@ -186,6 +186,7 @@ for p in packages.values():
|
|||
else:
|
||||
p.useExistingCatalogData()
|
||||
|
||||
excludeFilePath = os.path.join(rootDir, "zip-excludes.lst")
|
||||
|
||||
# def f(x):
|
||||
# x.generateZip(outPath)
|
||||
|
@ -196,7 +197,7 @@ for p in packages.values():
|
|||
# print(p.map(f,packagesToGenerate))
|
||||
|
||||
for p in packagesToGenerate:
|
||||
p.generateZip(outPath)
|
||||
p.generateZip(outPath, excludeFilePath)
|
||||
p.extractThumbnails(thumbnailPath)
|
||||
|
||||
print "Creating catalog"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue