Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: packagerChrome.py

Issue 29333538: Issue 3515 - Remove outdated hack ignoring sub-directories in lib/ (Closed)
Patch Set: Use set instead list Created Jan. 14, 2016, 11:28 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # coding: utf-8 1 # coding: utf-8
2 2
3 # This Source Code Form is subject to the terms of the Mozilla Public 3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 6
7 import sys 7 import sys
8 import os 8 import os
9 import re 9 import re
10 import json 10 import json
11 import struct 11 import struct
12 import io 12 import io
13 from StringIO import StringIO 13 from StringIO import StringIO
14 14
15 import packager 15 import packager
16 from packager import readMetadata, getMetadataPath, getDefaultFileName, getBuild Version, getTemplate, Files 16 from packager import readMetadata, getMetadataPath, getDefaultFileName, getBuild Version, getTemplate, Files
17 17
18 defaultLocale = 'en_US' 18 defaultLocale = 'en_US'
19 19
20 def getIgnoredFiles(params): 20 def getIgnoredFiles(params):
21 result = set(('store.description',)) 21 return {'store.description'}
22
23 # Hack: ignore all lib subdirectories
24 libDir = os.path.join(params['baseDir'], 'lib')
25 for file in os.listdir(libDir):
26 if os.path.isdir(os.path.join(libDir, file)):
27 result.add(file)
28 return result
29 22
30 def getPackageFiles(params): 23 def getPackageFiles(params):
31 result = set(('_locales', 'icons', 'jquery-ui', 'lib', 'skin', 'ui', 'ext')) 24 result = set(('_locales', 'icons', 'jquery-ui', 'lib', 'skin', 'ui', 'ext'))
32 25
33 if params['devenv']: 26 if params['devenv']:
34 result.add('qunit') 27 result.add('qunit')
35 28
36 baseDir = params['baseDir'] 29 baseDir = params['baseDir']
37 for file in os.listdir(baseDir): 30 for file in os.listdir(baseDir):
38 if file.endswith('.js') or file.endswith('.html') or file.endswith('.xml'): 31 if file.endswith('.js') or file.endswith('.html') or file.endswith('.xml'):
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmpl', 361 files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmpl',
369 ('general', 'testScripts')) 362 ('general', 'testScripts'))
370 363
371 zipdata = files.zipToString() 364 zipdata = files.zipToString()
372 signature = None 365 signature = None
373 pubkey = None 366 pubkey = None
374 if keyFile != None: 367 if keyFile != None:
375 signature = signBinary(zipdata, keyFile) 368 signature = signBinary(zipdata, keyFile)
376 pubkey = getPublicKey(keyFile) 369 pubkey = getPublicKey(keyFile)
377 writePackage(outFile, pubkey, signature, zipdata) 370 writePackage(outFile, pubkey, signature, zipdata)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld