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

Delta Between Two Patch Sets: packagerSafari.py

Issue 29349885: Issue 4340 - Drop dependency on external xar tool (Closed)
Left Patch Set: Added template for ToC generation and rebased Created Aug. 17, 2016, 10:04 a.m.
Right Patch Set: Addressed more nits Created Aug. 17, 2016, 7:21 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | xarfile.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # This Source Code Form is subject to the terms of the Mozilla Public 1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 4
5 import base64 5 import base64
6 import ConfigParser 6 import ConfigParser
7 import json 7 import json
8 import os 8 import os
9 import re 9 import re
10 from urlparse import urlparse 10 from urlparse import urlparse
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 if metadata.has_section('import_locales'): 166 if metadata.has_section('import_locales'):
167 importGeckoLocales(params, files) 167 importGeckoLocales(params, files)
168 168
169 if metadata.has_option('general', 'testScripts'): 169 if metadata.has_option('general', 'testScripts'):
170 files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmp l', 170 files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmp l',
171 ('general', 'testScripts')) 171 ('general', 'testScripts'))
172 172
173 if keyFile: 173 if keyFile:
174 from buildtools import xarfile 174 from buildtools import xarfile
175 certs = xarfile.read_certificates(keyFile) 175 certs, key = xarfile.read_certificates_and_key(keyFile)
176 params['developerIdentifier'] = get_developer_identifier(certs) 176 params['developerIdentifier'] = get_developer_identifier(certs)
177 177
178 files['lib/info.js'] = createInfoModule(params) 178 files['lib/info.js'] = createInfoModule(params)
179 files['background.html'] = createScriptPage(params, 'background.html.tmpl', 179 files['background.html'] = createScriptPage(params, 'background.html.tmpl',
180 ('general', 'backgroundScripts') ) 180 ('general', 'backgroundScripts') )
181 files['Info.plist'] = createManifest(params, files) 181 files['Info.plist'] = createManifest(params, files)
182 182
183 fixAbsoluteUrls(files) 183 fixAbsoluteUrls(files)
184 184
185 dirname = metadata.get('general', 'basename') + '.safariextension' 185 dirname = metadata.get('general', 'basename') + '.safariextension'
186 for filename in files.keys(): 186 for filename in files.keys():
187 files[os.path.join(dirname, filename)] = files.pop(filename) 187 files[os.path.join(dirname, filename)] = files.pop(filename)
188 188
189 if not devenv and keyFile: 189 if not devenv and keyFile:
190 from buildtools import xarfile 190 from buildtools import xarfile
191 xarfile.create(outFile, files, keyFile) 191 xarfile.create(outFile, files, keyFile)
192 else: 192 else:
193 files.zip(outFile) 193 files.zip(outFile)
LEFTRIGHT
« no previous file | xarfile.py » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld