diff --git a/Git-2.23.0-32-bit.exe b/Git-2.23.0-32-bit.exe deleted file mode 100644 index d9323b0..0000000 --- a/Git-2.23.0-32-bit.exe +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0cfcde18ebb3bf53304a78a92f3245b77377360dad85e9fbd33990843a88ee81 -size 47455080 diff --git a/Git-2.23.0-64-bit.exe b/Git-2.23.0-64-bit.exe deleted file mode 100644 index 7fe7867..0000000 --- a/Git-2.23.0-64-bit.exe +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:555cc19797fe6869fe60c156a59e9a29028f78476353775c3f6bca8e841940cd -size 47701816 diff --git a/Git-2.24.0-32-bit.exe b/Git-2.24.0-32-bit.exe new file mode 100644 index 0000000..f93f9e6 --- /dev/null +++ b/Git-2.24.0-32-bit.exe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82818e6cda4a264b2ecb51a9553b655011e7e6e333d0727c57aa4373848045d8 +size 47657280 diff --git a/Git-2.24.0-64-bit.exe b/Git-2.24.0-64-bit.exe new file mode 100644 index 0000000..3ac3f9d --- /dev/null +++ b/Git-2.24.0-64-bit.exe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc3d151bcb5a30382d6e08b0e93f2370fd4b4debe81905e2008019c9d748f0fc +size 47990624 diff --git a/WAPT/control b/WAPT/control index 256a81a..a518f3b 100644 --- a/WAPT/control +++ b/WAPT/control @@ -1,13 +1,15 @@ package : fws-git -version : 2.23.0-2 +version : 2.24.0-1 architecture : all section : base priority : optional +name : +categories : maintainer : Daniel Berteaud description : Git for Windows depends : fws-notepadplusplus conflicts : -maturity : PROD +maturity : PREPROD locale : all target_os : windows min_os_version : 6.1 @@ -25,8 +27,12 @@ editor : keywords : licence : GPLv2+ homepage : https://gitforwindows.org/ -package_uuid : +package_uuid : fd2e4c25-f3bc-4e6b-84fe-4cf2feb1fae4 +valid_from : +valid_until : +forced_install_on : signer : Daniel Berteaud -signer_fingerprint: -signature_date : -signed_attributes : \ No newline at end of file +signer_fingerprint: 3c9415559e2dedbc4390e3faa2c28d3b67265baa5b35902d2764d9e41c3b3f0a +signature : 3UMHqHfZmzgfAxgYoM2SI0/mBUhAPgX866go7uH5f60kOgLt7ltF9onW0aeVs2lzORReMyOQIDYrSyfWks38VSWjaGWUIwINa5vNqbpG70wct55s2OF6sCPwW2rTVYnB3FX9wuXNW7+u/MAADDgWZ1t7LqD7dGUXEkrvxfuR7LcIvlednQqqhMlO3i4EjnBX0tpEMjco5Z3NKpK8FmH23mQVWAwvXYWifavQLmMlXFrRk/HMDA0yopvrAcXtB5uQnosKz21LcBOHF6Avoi/nI3eXTYs4n+NVSCE9nClWGgabwZXTgKZFOGilPaJWN3yZoHwQXZiJvkYyOvgVNhOUoQ== +signature_date : 2019-11-05T13:24:57.951000 +signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,signer,signer_fingerprint,signature_date,signed_attributes \ No newline at end of file diff --git a/setup.py b/setup.py index 16afacd..28482a6 100644 --- a/setup.py +++ b/setup.py @@ -17,24 +17,26 @@ def install(): def update_package(): import re - print('Updating Git Package') + latest = json.loads(requests.get('https://api.github.com/repos/git-for-windows/git/releases/latest').text.encode('utf-8')) - version = re.search('v(.*)\.windows\.1', latest['tag_name']).group(1) + latest_version = re.search('v(.*)\.windows\.1', latest['tag_name']).group(1) pe = PackageEntry(); control = pe.load_control_from_wapt('.') - print('Last version is %s' % version) - for arch in ['32','64']: - for asset in latest['assets']: - if asset['name'] == 'Git-%s-%s-bit.exe' %(version,arch) and not isfile('Git-%s-%s-bit.exe' % (version,arch)): - url = asset['browser_download_url'] - print('Downloading Git %s for win%s from %s' % (version,arch,url)) - wget(url,asset['name']) - for old in glob.glob(r'Git-*-%s-bit.exe' % arch): - if not old == 'Git-%s-%s-bit.exe' %(version,arch): - remove_file(old) + current_version = control['version'].split('-',1)[0] + + if Version(latest_version) > Version(current_version): + print('Updateing package from %s to %s' % (current_version, latest_version)) + for arch in ['32','64']: + for asset in latest['assets']: + if asset['name'] == 'Git-%s-%s-bit.exe' % (latest_version, arch) and not isfile('Git-%s-%s-bit.exe' % (latest_version, arch)): + url = asset['browser_download_url'] + print('Downloading Git %s for win%s from %s' % (latest_version, arch, url)) + wget(url,asset['name']) + for old in glob.glob(r'Git-*-%s-bit.exe' % arch): + if not old == 'Git-%s-%s-bit.exe' % (latest_version, arch): + remove_file(old) - if Version(version) > Version(control['version'].split('-',1)[0]): - print('Updating control file with new version %s' % version) - pe.version = version + '-0' + print('Updating control file with new version %s' % latest_version) + pe.version = latest_version + '-0' pe.maturity = 'PREPROD' pe.save_control_to_wapt('.') \ No newline at end of file