tis-git

2.27.0-3
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
3135 downloads
Download

  Description 

  • package : tis-git
  • version : 2.27.0-3
  • architecture : x86
  • categories : Development,Utilities
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
  • locale :
  • target_os : windows
  • min_os_version : 6.1
  • max_os_version :
  • min_wapt_version : 1.5
  • sources : https://github.com/git-for-windows/git/releases
  • installed_size :
  • impacted_process : git-bash,git-cmd,git,git-gui,gitk,git-lfs,git
  • description_fr : Git est un logiciel de gestion de versions décentralisé
  • description_pl : Git – rozproszony system kontroli wersji.
  • description_de : Git ist eine freie Software zur verteilten Versionsverwaltung von Dateien.
  • description_es : Git es un software de control de versiones
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Software Freedom Conservancy
  • licence : GPLv2
  • signature_date : 2020-07-17T17:18:42.916541
  • Homepage : https://git-scm.com/

  Setup.py 

# -*- coding: utf-8 -*-
from setuphelpers import *
import json

uninstallkey = []

# Declaring specific app values (TO CHANGE)
bin_name_string = 'Git-%s-32-bit.exe'
silent_args = '/LOADINF="git.inf" /VERYSILENT /CLOSEAPPLICATIONS /NORESTART'
app_uninstallkey = 'Git_is1'


def install():
    # Initializing variables
    package_version = control.version.split('-')[0]
    bin_name = bin_name_string % package_version

    # Installing the package
    print('Installing: %s' % bin_name)
    install_exe_if_needed(bin_name
        ,silentflags=silent_args
        ,key=app_uninstallkey
        ,min_version=package_version)


def update_package():
    print('Downloading/Updating package content from upstream binary sources')

    # Specific app values
    app_name = control.name
    url_api = 'https://api.github.com/repos/git-for-windows/git/releases/latest'
    proxies = get_proxies()
    bin_end = bin_name_string.split(r'%s')[-1]

    # Getting latest informations from Github API
    json_load = json.loads(wgets(url_api,proxies=proxies))

    for download in json_load['assets']:
        if download['browser_download_url'].endswith(bin_end):
            url_dl = download['browser_download_url']
            break

    version = ((json_load['tag_name']).replace('.windows.1','')).replace('v','')
    latest_bin = bin_name_string % version

    print("Latest %s version is: %s" % (app_name,version))
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print('Downloading: ' + latest_bin)
        wget(url_dl,latest_bin,proxies=proxies)

        # Changing version of the package
        update_control_version(version)

    # Checking version from file
    version_from_file = get_version_from_binary(latest_bin)
    if is_version_different(version,version_from_file):
        rename_filename_version(latest_bin,version,version_from_file)

    # Deleting outdated binaries
    remove_outdated_binary(version)




def update_control_version(version):
    package_version = control.get_software_version()

    control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
    control.save_control_to_wapt()
    print('Changing version to: %s in WAPT\\control' % control.version)
    
def get_version_from_binary(filename):
    if filename.endswith('.msi'):
        return get_msi_properties(filename)['ProductVersion']
    else:
        return get_file_properties(filename)['ProductVersion']

def is_version_different(version_x,version_y):
    if version_x == '':
        return False
    if version_y == '':
        return False
    if Version(version_x) != Version(version_y):
        return True
    else:
        return False

def rename_filename_version(filename,old_version,new_version):
    ##old_version = Version(old_version)
    #new_version = Version(new_version)
    old_filename = filename
    new_filename = filename.replace(old_version,new_version)
    if isfile(new_filename):
        remove_file(new_filename)
    os.rename(old_filename,new_filename)
    print(r'Filename renamed from %s to %s' % (old_filename,new_filename))

def get_proxies():
    import platform
    if platform.python_version_tuple()[0] == '3':
        from urllib.request import getproxies
    else:
        from urllib import getproxies
    return getproxies()

def remove_outdated_binary(version,list_extensions=('exe','msi','deb','rpm','dmg','pkg')):
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*.%s' % file_ext):
            if not version in bin_in_dir:
                print('Outdated binary: %s Removed' % bin_in_dir)
                remove_file(bin_in_dir)

										

  Changelog 


Changelog software url : https://github.com/git/git/blob/master/Documentation/RelNotes

No changelog
  manifest.sha256 
[["Git-2.27.0-32-bit.exe","876ec8b8fc283ddbacab424379eeb7263e4515c497a208419c4e893da87499f8"],["git.inf","2c44a43a08f5f54a94c77bbf5c773f230594402e50a9ed63e4a72b756b4e45c3"],["setup.py","af540b13ddfcfe8f3799e1f5bb4580a910bb5685c2b3179298249d252592f7c8"],["WAPT/icon.png","4a6e5031edc6e22a06cb5f12e89dea8738b88839c2cb99e2e7e0d9df345e2252"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/control","c7bede2b0cbf9c5d9f56ca5b648ca096eab0d44b4b20ace7a267bef494714c0e"]]