tis-git

2.30.1-6
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.
6686 downloads
Download

  Description 

  • package : tis-git
  • version : 2.30.1-6
  • architecture : x64
  • 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 : all
  • target_os : windows
  • min_wapt_version : 1.7
  • 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 : 2021-02-09T17:30:56.616549
  • Homepage : https://git-scm.com/
  • Conflicts :

  Setup.py 

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

uninstallkey = []

# Defining variables
bin_name_string = 'Git-%s-64-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')

    # Initializing variables
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()

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

    # Getting latest informations from Github API
    print('API used is: ' + url_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','').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: %s' % latest_bin)
        wget(url_dl, latest_bin, proxies=proxies)

        # Checking version from file
        version_from_file = get_version_from_binary(latest_bin)
        if version != version_from_file:
            os.rename(latest_bin,bin_name_string % version_from_file)
            version = version_from_file

        # Changing version of the package
        control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
        control.save_control_to_wapt()
        print('Changing package version to: %s in WAPT\\control' % control.version)

    # Deleting outdated binaries
    remove_outdated_binaries(version)




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


def get_proxies_from_wapt_console():
    proxies = {}
    if platform.system() == 'Windows':
        waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
    else:
        waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
    if isfile(waptconsole_ini_path):
        proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
        if proxy_wapt:
            proxies = {'http': proxy_wapt, 'https': proxy_wapt}
    return proxies


def get_version_from_binary(filename):
    if filename.endswith('.msi'):
        return get_msi_properties(filename)['ProductVersion']
    else:
        return get_file_properties(filename)['ProductVersion']


def remove_outdated_binaries(version, list_extensions=['exe','msi','deb','rpm','dmg','pkg'], list_filename_contain=None):
    if type(list_extensions) != list:
        list_extensions = [list_extensions]
    if list_filename_contain:
        if type(list_filename_contain) != list:
            list_filename_contain = [list_filename_contain]
    list_extensions = ['.' + ext for ext in list_extensions if ext[0] != '.']
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*%s' % file_ext):
            if not version in bin_in_dir:
                remove_file(bin_in_dir)
            if list_filename_contain:
                for filename_contain in list_filename_contain:
                    if not filename_contain in bin_in_dir:
                        remove_file(bin_in_dir)



										

  Changelog 



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



No changelog.txt.
									
  manifest.sha256