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

Delta Between Two Patch Sets: sitescripts/extensions/bin/createNightlies.py

Issue 29589674: Issue 5942 - don't create Gecko update manifests (Closed)
Left Patch Set: Created Oct. 26, 2017, 8:45 p.m.
Right Patch Set: Removing further unused code Created Oct. 26, 2017, 10:35 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 | « .sitescripts.example ('k') | sitescripts/extensions/bin/updateUpdateManifests.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 file is part of the Adblock Plus web scripts, 1 # This file is part of the Adblock Plus web scripts,
2 # Copyright (C) 2006-present eyeo GmbH 2 # Copyright (C) 2006-present eyeo GmbH
3 # 3 #
4 # Adblock Plus is free software: you can redistribute it and/or modify 4 # Adblock Plus is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License version 3 as 5 # it under the terms of the GNU General Public License version 3 as
6 # published by the Free Software Foundation. 6 # published by the Free Software Foundation.
7 # 7 #
8 # Adblock Plus is distributed in the hope that it will be useful, 8 # Adblock Plus is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 read Gecko-specific metadata file from a cloned repository 168 read Gecko-specific metadata file from a cloned repository
169 and parse id, version, basename and the compat section 169 and parse id, version, basename and the compat section
170 out of the file 170 out of the file
171 """ 171 """
172 import buildtools.packagerGecko as packager 172 import buildtools.packagerGecko as packager
173 metadata = packager.readMetadata(self.tempdir, self.config.type) 173 metadata = packager.readMetadata(self.tempdir, self.config.type)
174 self.extensionID = metadata.get('general', 'id') 174 self.extensionID = metadata.get('general', 'id')
175 self.version = packager.getBuildVersion(self.tempdir, metadata, False, 175 self.version = packager.getBuildVersion(self.tempdir, metadata, False,
176 self.buildNum) 176 self.buildNum)
177 self.basename = metadata.get('general', 'basename') 177 self.basename = metadata.get('general', 'basename')
178 self.compat = []
179 for key, value in packager.KNOWN_APPS.iteritems():
180 if metadata.has_option('compat', key):
181 minVersion, maxVersion = metadata.get('compat', key).split('/')
182 self.compat.append({'id': value, 'minVersion': minVersion, 'maxV ersion': maxVersion})
183
184 if metadata.has_option('compat', 'gecko'):
185 self.compat.append({
186 'id': 'gecko',
187 'minVersion': metadata.get('compat', 'gecko')
188 })
189 178
190 def readAndroidMetadata(self): 179 def readAndroidMetadata(self):
191 """ 180 """
192 Read Android-specific metadata from AndroidManifest.xml file. 181 Read Android-specific metadata from AndroidManifest.xml file.
193 """ 182 """
194 manifestFile = open(os.path.join(self.tempdir, 'AndroidManifest.xml'), ' r') 183 manifestFile = open(os.path.join(self.tempdir, 'AndroidManifest.xml'), ' r')
195 manifest = parseXml(manifestFile) 184 manifest = parseXml(manifestFile)
196 manifestFile.close() 185 manifestFile.close()
197 186
198 root = manifest.documentElement 187 root = manifest.documentElement
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 self.copyRepository() 646 self.copyRepository()
658 self.buildNum = self.getCurrentBuild() 647 self.buildNum = self.getCurrentBuild()
659 648
660 # get meta data from the repository 649 # get meta data from the repository
661 if self.config.type == 'android': 650 if self.config.type == 'android':
662 self.readAndroidMetadata() 651 self.readAndroidMetadata()
663 elif self.config.type == 'chrome': 652 elif self.config.type == 'chrome':
664 self.readChromeMetadata() 653 self.readChromeMetadata()
665 elif self.config.type == 'safari': 654 elif self.config.type == 'safari':
666 self.readSafariMetadata() 655 self.readSafariMetadata()
667 elif self.config.type in {'gecko', 'gecko-webext'}: 656 elif self.config.type in {'gecko', 'gecko-webext'}:
Vasily Kuznetsov 2017/10/27 18:47:05 Do we still support both?
tlucas 2017/10/27 19:14:48 No, but the removal of "gecko-webext" is handled i
668 self.readGeckoMetadata() 657 self.readGeckoMetadata()
669 elif self.config.type == 'edge': 658 elif self.config.type == 'edge':
670 self.read_edge_metadata() 659 self.read_edge_metadata()
671 else: 660 else:
672 raise Exception('Unknown build type {}' % self.config.type) 661 raise Exception('Unknown build type {}' % self.config.type)
673 662
674 # create development build 663 # create development build
675 self.build() 664 self.build()
676 665
677 # write out changelog 666 # write out changelog
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 except Exception as ex: 717 except Exception as ex:
729 logging.error('The build for %s failed:', repo) 718 logging.error('The build for %s failed:', repo)
730 logging.exception(ex) 719 logging.exception(ex)
731 720
732 file = open(nightlyConfigFile, 'wb') 721 file = open(nightlyConfigFile, 'wb')
733 nightlyConfig.write(file) 722 nightlyConfig.write(file)
734 723
735 724
736 if __name__ == '__main__': 725 if __name__ == '__main__':
737 main() 726 main()
LEFTRIGHT

Powered by Google App Engine
This is Rietveld