tis-git-lfs

2.12.1-3
Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server
1319 downloads
Download

  Description 

  • package : tis-git-lfs
  • version : 2.12.1-3
  • architecture : all
  • categories : Development
  • maintainer : WAPT Team,Jimmy PELÉ
  • description : Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server
  • locale :
  • target_os :
  • min_wapt_version :
  • sources : https://github.com/git-lfs/git-lfs/releases
  • installed_size :
  • impacted_process :
  • description_fr :
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor :
  • licence :
  • signature_date : 2020-11-05T17:26:45.779286

  Setup.py 

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

uninstallkey = []

# Declaring specific app values (TO CHANGE)
bin_name_string = 'git-lfs-windows-v%s.exe'
silent_args = '/VERYSILENT /NORESTART /SUPRESSMSGBOXES'
app_uninstallkey = '{286391DE-F778-44EA-9375-1B21AAA04FF0}_is1'


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

    # Installing the package
    install_exe_if_needed(bin_name
        ,silentflags=silent_args
        ,key=app_uninstallkey
        ,min_version=package_version)


def update_package():
    print('Download/Update package content from upstream binary sources')

    # Getting proxy informations from WAPT settings
    proxy = {}
    if platform.system()=='Windows' and isfile(makepath(user_local_appdata(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxy = {'http':proxywapt,'https':proxywapt}

    # Specific app values
    app_name = control.name
    git_repo = 'git-lfs/git-lfs'
    url_api = 'https://api.github.com/repos/%s/releases/latest' % git_repo
    bin_start = bin_name_string.split('%s')[0]

    # Getting latest version from official website
    json_load = json.loads(wgets(url_api,proxies=proxy))

    for download in json_load['assets']:
        if download['name'].startswith(bin_start):
            url_dl = download['browser_download_url']
            latest_bin = download['name']
            break

    version = json_load['tag_name'].replace('v','')

    print('Latest ' + app_name + ' version is: ' + version)
    print('Download url is: ' + url_dl)

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

        # Get version from file
        version_from_file = get_file_properties(latest_bin)['ProductVersion']
        if version != version_from_file and version_from_file != '':
            version = version_from_file
            old_latest_bin = latest_bin
            latest_bin = bin_name_string % version
            if isfile(latest_bin):
                remove_file(latest_bin)
            os.rename(old_latest_bin,latest_bin)

		# Change version of the package
        pe = PackageEntry().load_control_from_wapt('.')
        pe.version = '%s-%s'%(version,int(pe.version.split('-',1)[1])+1)
        pe.save_control_to_wapt('.')
        print('Changing version to ' + pe.version + ' in WAPT\\control')
        print('Update package done. You can now build-upload your package')
    else:
        print('This package is already up-to-date')

    # Deleting outdated binaries
    for bin_in_dir in glob.glob('*.exe') or glob.glob('*.msi'):
        if bin_in_dir != latest_bin :
            print('Outdated binary: ' + bin_in_dir + ' Deleted')
            remove_file(bin_in_dir)


										

  Changelog 



No changelog.txt.
									
  manifest.sha256