|
|
|
@ -22,11 +22,15 @@ def update_package(): |
|
|
|
|
pe = PackageEntry(); |
|
|
|
|
control = pe.load_control_from_wapt('.') |
|
|
|
|
for arch in ['32','64']: |
|
|
|
|
if not isfile('TortoiseGit-%s.0-%sbit.msi' % (version, arch)): |
|
|
|
|
filename = 'TortoiseGit-%s.0-%sbit.msi' % (version, arch) |
|
|
|
|
url = 'https://download.tortoisegit.org/tgit/%s.0/%s' % (version, filename) |
|
|
|
|
if not isfile('TortoiseGit-%s.0-%sbit.msi' % (version, arch)): |
|
|
|
|
print('Downloading Tortoise Git %s for win%s from %s' % (version, arch, url)) |
|
|
|
|
wget(url, filename) |
|
|
|
|
if isfile(filename): |
|
|
|
|
for old in glob.glob(r'TortoiseGit-*%sbit.msi' % arch): |
|
|
|
|
if old != filename: |
|
|
|
|
remove_file(old) |
|
|
|
|
|
|
|
|
|
if Version(version) > Version(control['version'].split('-',1)[0]): |
|
|
|
|
print('Updating control file with new version %s' % version) |
|
|
|
|