|
|
|
@ -61,13 +61,14 @@ def update_package(): |
|
|
|
|
version = latest['tag_name'].split('-',1)[0].lstrip('v').rstrip('p1') |
|
|
|
|
pe = PackageEntry(); |
|
|
|
|
control = pe.load_control_from_wapt('.') |
|
|
|
|
for arch in ['32','64']: |
|
|
|
|
for asset in latest['assets']: |
|
|
|
|
if asset['name'] == 'OpenSSH-Win%s.zip' % arch and not isfile('OpenSSH-Win%s.zip' % arch): |
|
|
|
|
url = asset['browser_download_url'] |
|
|
|
|
print('Downloading OpenSSH %s for win%s from %s' % (version,arch,url)) |
|
|
|
|
wget(url,'OpenSSH-Win%s.zip' % arch) |
|
|
|
|
if Version(version) > Version(control['version'].split('-',1)[0]): |
|
|
|
|
for arch in ['32','64']: |
|
|
|
|
remove_file('OpenSSH-Win%s.zip' % arch) |
|
|
|
|
for asset in latest['assets']: |
|
|
|
|
if asset['name'] == 'OpenSSH-Win%s.zip' % arch and not isfile('OpenSSH-Win%s.zip' % arch): |
|
|
|
|
url = asset['browser_download_url'] |
|
|
|
|
print('Downloading OpenSSH %s for win%s from %s' % (version,arch,url)) |
|
|
|
|
wget(url,'OpenSSH-Win%s.zip' % arch) |
|
|
|
|
print('Updating control file with new version %s' % version) |
|
|
|
|
pe.version = version + '-0' |
|
|
|
|
pe.save_control_to_wapt('.') |
|
|
|
|