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

Side by Side Diff: packagerEdge.py

Issue 29374642: Issue 4865 - Make sure Identity.Name attribute is different for devbuilds for Edge (Closed)
Patch Set: Created Feb. 6, 2017, 3:24 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 # 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
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 params.update(metadata.items('general')) 85 params.update(metadata.items('general'))
86 params['version'] = pad_version(params['version']) 86 params['version'] = pad_version(params['version'])
87 87
88 metadata_id_suffix = 'release' if release_build else 'devbuild' 88 metadata_id_suffix = 'release' if release_build else 'devbuild'
89 metadata_id = 'extension_id_' + metadata_id_suffix 89 metadata_id = 'extension_id_' + metadata_id_suffix
90 if metadata.has_option('general', metadata_id): 90 if metadata.has_option('general', metadata_id):
91 params['app_extension_id'] = metadata.get('general', metadata_id) 91 params['app_extension_id'] = metadata.get('general', metadata_id)
92 else: 92 else:
93 params['app_extension_id'] = 'EdgeExtension' 93 params['app_extension_id'] = 'EdgeExtension'
94 94
95 if not release_build:
96 params['app_id'] += 'developmentbuild'
Sebastian Noack 2017/02/07 14:44:38 During the review of the initial implementation we
Vasily Kuznetsov 2017/02/07 14:57:41 I prefer the second option. Constructing ids from
Oleksandr 2017/02/08 06:56:55 Done.
97
95 translation = load_translation(files, defaultLocale) 98 translation = load_translation(files, defaultLocale)
96 name_key = 'name' if release_build else 'name_devbuild' 99 name_key = 'name' if release_build else 'name_devbuild'
97 params['display_name'] = translation[name_key]['message'] 100 params['display_name'] = translation[name_key]['message']
98 params['description'] = translation['description']['message'] 101 params['description'] = translation['description']['message']
99 102
100 for size in ['44', '50', '150']: 103 for size in ['44', '50', '150']:
101 path = '{}/logo_{}.png'.format(ASSETS_DIR, size) 104 path = '{}/logo_{}.png'.format(ASSETS_DIR, size)
102 if path not in files: 105 if path not in files:
103 raise KeyError(path + ' is not found in files') 106 raise KeyError(path + ' is not found in files')
104 params['logo_' + size] = path.replace('/', '\\') 107 params['logo_' + size] = path.replace('/', '\\')
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 if metadata.has_section('appx_assets'): 191 if metadata.has_section('appx_assets'):
189 for name, path in metadata.items('appx_assets'): 192 for name, path in metadata.items('appx_assets'):
190 path = os.path.join(baseDir, path) 193 path = os.path.join(baseDir, path)
191 files.read(path, '{}/{}'.format(ASSETS_DIR, name)) 194 files.read(path, '{}/{}'.format(ASSETS_DIR, name))
192 195
193 files[MANIFEST] = create_appx_manifest(params, files, releaseBuild) 196 files[MANIFEST] = create_appx_manifest(params, files, releaseBuild)
194 files[BLOCKMAP] = create_appx_blockmap(files) 197 files[BLOCKMAP] = create_appx_blockmap(files)
195 files[CONTENT_TYPES] = create_content_types_map(files.keys() + [BLOCKMAP]) 198 files[CONTENT_TYPES] = create_content_types_map(files.keys() + [BLOCKMAP])
196 199
197 files.zip(outfile, compression=zipfile.ZIP_STORED) 200 files.zip(outfile, compression=zipfile.ZIP_STORED)
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