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

Side by Side Diff: releaseAutomation.py

Issue 29599576: Issue 5994 - Use correct value for extensionName (Closed)
Patch Set: Created Nov. 6, 2017, 12:38 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 from __future__ import print_function 5 from __future__ import print_function
6 6
7 import os 7 import os
8 import re 8 import re
9 import codecs 9 import codecs
10 import subprocess 10 import subprocess
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 ) 134 )
135 135
136 file.seek(0) 136 file.seek(0)
137 file.write(rawMetadata) 137 file.write(rawMetadata)
138 file.truncate() 138 file.truncate()
139 139
140 # Read extension name from locale data 140 # Read extension name from locale data
141 default_locale_path = os.path.join('_locales', packager.defaultLocale, 141 default_locale_path = os.path.join('_locales', packager.defaultLocale,
142 'messages.json') 142 'messages.json')
143 with open(default_locale_path, 'r') as fp: 143 with open(default_locale_path, 'r') as fp:
144 extensionName = json.load(fp)['name'] 144 extensionName = json.load(fp)['name']['message']
145 145
146 # Now commit the change and tag it 146 # Now commit the change and tag it
147 subprocess.check_call(['hg', 'commit', '-R', baseDir, '-m', 'Releasing %s %s ' % (extensionName, version)]) 147 subprocess.check_call(['hg', 'commit', '-R', baseDir, '-m', 'Releasing %s %s ' % (extensionName, version)])
148 tag_name = version 148 tag_name = version
149 if type == 'edge': 149 if type == 'edge':
150 tag_name = '{}-{}'.format(tag_name, type) 150 tag_name = '{}-{}'.format(tag_name, type)
151 subprocess.check_call(['hg', 'tag', '-R', baseDir, '-f', tag_name]) 151 subprocess.check_call(['hg', 'tag', '-R', baseDir, '-f', tag_name])
152 152
153 # Create a release build 153 # Create a release build
154 downloads = [] 154 downloads = []
(...skipping 16 matching lines...) Expand all
171 create_sourcearchive(baseDir, archivePath) 171 create_sourcearchive(baseDir, archivePath)
172 downloads.append(archivePath) 172 downloads.append(archivePath)
173 173
174 # Now add the downloads and commit 174 # Now add the downloads and commit
175 subprocess.check_call(['hg', 'add', '-R', downloadsRepo] + downloads) 175 subprocess.check_call(['hg', 'add', '-R', downloadsRepo] + downloads)
176 subprocess.check_call(['hg', 'commit', '-R', downloadsRepo, '-m', 'Releasing %s %s' % (extensionName, version)]) 176 subprocess.check_call(['hg', 'commit', '-R', downloadsRepo, '-m', 'Releasing %s %s' % (extensionName, version)])
177 177
178 # Push all changes 178 # Push all changes
179 subprocess.check_call(['hg', 'push', '-R', baseDir]) 179 subprocess.check_call(['hg', 'push', '-R', baseDir])
180 subprocess.check_call(['hg', 'push', '-R', downloadsRepo]) 180 subprocess.check_call(['hg', 'push', '-R', downloadsRepo])
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