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

Side by Side Diff: releaseAutomation.py

Issue 29337971: Issue 3760 - Removed support for Opera builds (Closed)
Patch Set: Updated help text for -k option Created March 8, 2016, 6:26 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 | « packagerSafari.py ('k') | 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 os, re, codecs, subprocess, tarfile, json 7 import os, re, codecs, subprocess, tarfile, json
8 8
9 def get_dependencies(prefix, repos): 9 def get_dependencies(prefix, repos):
10 from ensure_dependencies import read_deps, safe_join 10 from ensure_dependencies import read_deps, safe_join
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 # Create a release build 75 # Create a release build
76 downloads = [] 76 downloads = []
77 if type == "gecko": 77 if type == "gecko":
78 keyFile = keyFiles[0] if keyFiles else None 78 keyFile = keyFiles[0] if keyFiles else None
79 metadata = packager.readMetadata(baseDir, type) 79 metadata = packager.readMetadata(baseDir, type)
80 buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(metadata , version, 'xpi')) 80 buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(metadata , version, 'xpi'))
81 packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=Tru e, keyFile=keyFile) 81 packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=Tru e, keyFile=keyFile)
82 downloads.append(buildPath) 82 downloads.append(buildPath)
83 elif type == "chrome": 83 elif type == "chrome":
84 # We actually have to create four different builds for Chrome: signed a unsi gned Chrome builds 84 # We actually have to create three different builds: signed and unsigned
85 # (the latter for Chrome Web Store), a signed Opera build and a signed Safar i build. 85 # Chrome builds (the latter for Chrome Web Store), and a signed Safari build .
86 metadata = packager.readMetadata(baseDir, type) 86 metadata = packager.readMetadata(baseDir, type)
87 buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(metadata , version, 'crx')) 87 buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(metadata , version, 'crx'))
88 packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=Tru e, keyFile=keyFiles[0]) 88 packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=Tru e, keyFile=keyFiles[0])
89 downloads.append(buildPath) 89 downloads.append(buildPath)
90 90
91 buildPathUnsigned = os.path.join(baseDir, packager.getDefaultFileName(metada ta, version, 'zip')) 91 buildPathUnsigned = os.path.join(baseDir, packager.getDefaultFileName(metada ta, version, 'zip'))
92 packager.createBuild(baseDir, type=type, outFile=buildPathUnsigned, releaseB uild=True, keyFile=None) 92 packager.createBuild(baseDir, type=type, outFile=buildPathUnsigned, releaseB uild=True, keyFile=None)
93 93
94 metadataOpera = packager.readMetadata(baseDir, "opera")
95 buildPathOpera = os.path.join(downloadsRepo, packager.getDefaultFileName(met adataOpera, version, 'crx'))
96 packager.createBuild(baseDir, type="opera", outFile=buildPathOpera, releaseB uild=True, keyFile=keyFiles[0])
97 downloads.append(buildPathOpera)
98
99 import buildtools.packagerSafari as packagerSafari 94 import buildtools.packagerSafari as packagerSafari
100 metadataSafari = packagerSafari.readMetadata(baseDir, "safari") 95 metadataSafari = packagerSafari.readMetadata(baseDir, "safari")
101 buildPathSafari = os.path.join(downloadsRepo, packagerSafari.getDefaultFileN ame(metadataSafari, version, 'safariextz')) 96 buildPathSafari = os.path.join(downloadsRepo, packagerSafari.getDefaultFileN ame(metadataSafari, version, 'safariextz'))
102 packagerSafari.createBuild(baseDir, type="safari", outFile=buildPathSafari, releaseBuild=True, keyFile=keyFiles[1]) 97 packagerSafari.createBuild(baseDir, type="safari", outFile=buildPathSafari, releaseBuild=True, keyFile=keyFiles[1])
103 downloads.append(buildPathSafari) 98 downloads.append(buildPathSafari)
104 99
105 # Create source archive 100 # Create source archive
106 archivePath = os.path.splitext(buildPath)[0] + '-source.tgz' 101 archivePath = os.path.splitext(buildPath)[0] + '-source.tgz'
107 create_sourcearchive(baseDir, archivePath) 102 create_sourcearchive(baseDir, archivePath)
108 downloads.append(archivePath) 103 downloads.append(archivePath)
109 104
110 # Now add the downloads and commit 105 # Now add the downloads and commit
111 subprocess.check_call(['hg', 'add', '-R', downloadsRepo] + downloads) 106 subprocess.check_call(['hg', 'add', '-R', downloadsRepo] + downloads)
112 subprocess.check_call(['hg', 'commit', '-R', downloadsRepo, '-m', 'Releasing % s %s' % (extensionName, version)]) 107 subprocess.check_call(['hg', 'commit', '-R', downloadsRepo, '-m', 'Releasing % s %s' % (extensionName, version)])
113 108
114 # Push all changes 109 # Push all changes
115 subprocess.check_call(['hg', 'push', '-R', baseDir]) 110 subprocess.check_call(['hg', 'push', '-R', baseDir])
116 subprocess.check_call(['hg', 'push', '-R', downloadsRepo]) 111 subprocess.check_call(['hg', 'push', '-R', downloadsRepo])
OLDNEW
« no previous file with comments | « packagerSafari.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld