Added both links to changelog to get both of best worlds.

This commit is contained in:
Joey Payne 2015-11-14 15:26:38 -07:00
commit 6eb3fa9cf9
2 changed files with 16 additions and 7 deletions

View file

@ -391,19 +391,28 @@ class CommandBase(object):
def get_versions(self):
if self.logger is not None:
self.logger.info('Getting versions...')
response = urllib2.urlopen(self.settings['version_info']['url'])
html = response.read()
nw_version = self.get_setting('nw_version')
union_versions = set()
old_versions = set(nw_version.values)
new_versions = set(re.findall('(\S+) / \S+', html))
for url in self.settings['version_info']['urls']:
response = urllib2.urlopen(url)
html = response.read()
union_versions = list(old_versions.union(new_versions))
nw_version = self.get_setting('nw_version')
old_versions = set(nw_version.values)
old_versions = old_versions.union(union_versions)
new_versions = set(re.findall('(\S+) / \S+', html))
union_versions = old_versions.union(new_versions)
versions = sorted(union_versions,
key=Version, reverse=True)
if len(versions) > 19:
#Cut off old versions
versions = versions[:-19]
nw_version.values = versions
f = None
try:

View file

@ -367,4 +367,4 @@ linux_64_dir_prefix = 'node-webkit-v{}-linux-x64'
'force_download']"""
[version_info]
url='https://raw.githubusercontent.com/nwjs/nw.js/nw13/CHANGELOG.md'
urls="""['https://raw.githubusercontent.com/nwjs/nw.js/nw13/CHANGELOG.md', 'https://raw.githubusercontent.com/nwjs/nw.js/master/CHANGELOG.md']"""