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

Delta Between Two Patch Sets: packagerEdge.py

Issue 29357701: Issue 4548 - Split out Safari and add Edge release automation (Closed)
Left Patch Set: Removed redundant keyFile parameters Created Oct. 25, 2016, 7:47 a.m.
Right Patch Set: Addressed nits Created Oct. 27, 2016, 3:53 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 | « build.py ('k') | releaseAutomation.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 hashlib 6 import hashlib
7 import json 7 import json
8 import mimetypes 8 import mimetypes
9 import os 9 import os
10 import zipfile 10 import zipfile
11 11
12 import packager 12 import packager
13 import packagerChrome 13 import packagerChrome
14 from packager import (readMetadata, getDefaultFileName)
15 14
16 # Files and directories expected inside of the .APPX archive. 15 # Files and directories expected inside of the .APPX archive.
17 MANIFEST = 'AppxManifest.xml' 16 MANIFEST = 'AppxManifest.xml'
18 CONTENT_TYPES = '[Content_Types].xml' 17 CONTENT_TYPES = '[Content_Types].xml'
19 BLOCKMAP = 'AppxBlockMap.xml' 18 BLOCKMAP = 'AppxBlockMap.xml'
20 EXTENSION_DIR = 'Extension' 19 EXTENSION_DIR = 'Extension'
21 ASSETS_DIR = 'Assets' 20 ASSETS_DIR = 'Assets'
22 21
23 # Size of uncompressed block in the APPX block map. 22 # Size of uncompressed block in the APPX block map.
24 BLOCKSIZE = 64 * 1024 23 BLOCKSIZE = 64 * 1024
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 if metadata.has_section('appx_assets'): 174 if metadata.has_section('appx_assets'):
176 for name, path in metadata.items('appx_assets'): 175 for name, path in metadata.items('appx_assets'):
177 path = os.path.join(baseDir, path) 176 path = os.path.join(baseDir, path)
178 files.read(path, '{}/{}'.format(ASSETS_DIR, name)) 177 files.read(path, '{}/{}'.format(ASSETS_DIR, name))
179 178
180 files[MANIFEST] = create_appx_manifest(params, files, releaseBuild) 179 files[MANIFEST] = create_appx_manifest(params, files, releaseBuild)
181 files[BLOCKMAP] = create_appx_blockmap(files) 180 files[BLOCKMAP] = create_appx_blockmap(files)
182 files[CONTENT_TYPES] = create_content_types_map(files.keys() + [BLOCKMAP]) 181 files[CONTENT_TYPES] = create_content_types_map(files.keys() + [BLOCKMAP])
183 182
184 files.zip(outfile, compression=zipfile.ZIP_STORED) 183 files.zip(outfile, compression=zipfile.ZIP_STORED)
LEFTRIGHT

Powered by Google App Engine
This is Rietveld