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