ConfigCat CLI
Silent install package for ConfigCat CLI
								
								2.5.1-1
								
							
							
                                    Preprod packages are packages built on LUTI.
                                    They remain in PREPROD usually for 5 days, after which a new VirusTotal scan is performed.
                                    
                                    If the package passes this last check, it is promoted to PROD and published on the store.
                                
- package: tis-configcat-cli
 - name: ConfigCat CLI
 - version: 2.5.1-1
 - maintainer: Amel FRADJ
 - licence: MIT license
 - target_os: windows
 - architecture: x86
 - signature_date:
 - size: 14.49 Mo
 - homepage : configcat.github.io/cli
 
package           : tis-configcat-cli
version           : 2.5.1-1
architecture      : x86
section           : base
priority          : optional
name              : ConfigCat CLI
categories        : 
maintainer        : Amel FRADJ
description       : Command Line Interface for ConfigCat
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : 
target_os         : windows
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Interface de ligne de commande pour ConfigCat
description_pl    : Interfejs wiersza poleceń dla ConfigCat
description_de    : Befehlszeilenschnittstelle für ConfigCat
description_es    : Interfaz de línea de comandos para ConfigCat
description_pt    : Interface de linha de comando para o ConfigCat
description_it    : Interfaccia a riga di comando per ConfigCat
description_nl    : Opdrachtregelinterface voor ConfigCat
description_ru    : Интерфейс командной строки для ConfigCat
audit_schedule    : 
editor            : 
keywords          : 
licence           : MIT license
homepage          : configcat.github.io/cli
package_uuid      : b51b2c87-d7fb-45cf-84bf-42c719d4d6e6
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 2005c82ff1596419cecbae082493e594de783386a12f47a9b0d0486681a3ada9
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2025-11-03T22:28:13.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : TFn3imJ/1FpGDiL2jczruOtA0hcYjVNqZMazJlmUPTSLJZPmqX2jx8gJvy43X9zUjgqAlY10N2yrmqUYrXKdCajxVQJGW0oL/W8qck4ILY/2pDpyyDz9c1RAg4zaV+/2G4t+C//W5iVlPdonGS55iSXaekizrOkM/3vaA7hpWUYK7V7px5rqC3nX+0QRjlJORJ1thmQPZq9d6jr6PFYl4Ln0ncsX9sDfULT6DeoepC4LT3ruCiYHpi2H4orOcNyZ0uGppPApr/uslndOuKfS6/xmh53WASTQuKMzG1q4o7X8vGBsxoLY/2QrRvx8utVmz99gqox8sv7oMTexn7MMHQ==
                        # -*- coding: utf-8 -*-
from setuphelpers import *
"""
"""
app_name = "configcat "
editor_dir = makepath(programfiles, "configcat")
app_dir = makepath(editor_dir, "configcat")
app_path = makepath(app_dir, "configcat.exe")
audit_version = False
def get_installed_version(app_path):
    return get_file_properties(app_path).get("FileVersion", "")
def install():
    # Declaring local variables
    zip_name = glob.glob(f"configcat-*.zip")[0]
    unzipped_dir = "configcat"
    # Installing software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir) and force:
        remove_tree(app_dir)
    mkdirs(app_dir)
    print("Extracting: %s to: %s" % (zip_name, unzipped_dir))
    unzip(zip_name, unzipped_dir)
    print('Copy configcat to %s' % app_dir)
    copytree2(unzipped_dir, app_dir, onreplace=default_overwrite)
    add_to_system_path(app_dir)
    
def audit():
    # Auditing software
    audit_status = "OK"
    installed_version = get_installed_version(app_path)
    if Version(installed_version) < Version(control.get_software_version()) and audit_version:
        print("%s is installed in version (%s) instead of (%s)" % (app_name, installed_version, control.get_software_version()))
        audit_status = "WARNING"
    elif isdir(app_dir) and not dir_is_empty(app_dir):
        print("%s (%s) is installed" % (app_name, installed_version))
        audit_status = "OK"
    else:
        print("%s is not installed" % app_name)
        audit_status = "ERROR"
    return audit_status
def uninstall():
    # Uninstalling software
    killalltasks(ensure_list(control.impacted_process))
    if isdir(app_dir):
        remove_tree(app_dir)
    if dir_is_empty(editor_dir):
        remove_tree(editor_dir)
    
                            # -*- coding: utf-8 -*-
from setuphelpers import *
import re
def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    dict_arch = {
        "x64" :"_win-x64.zip",
        "x86" :"_win-x86.zip"
    }
    git_repo = "configcat/cli"
    url_api = "https://api.github.com/repos/%s/releases/latest" % git_repo
    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))
    for download in json_load["assets"]:
        if download["browser_download_url"].endswith(".zip") and dict_arch[control.architecture] in download["browser_download_url"] :
            url_dl = download["browser_download_url"]
            version = json_load["tag_name"].replace("v","")
            filename = download["name"]
            break
    if not isfile(filename):
        package_updated = True
        wget(url_dl, filename, proxies=proxies)
    # nettoyer les fichiers temporaires
    for f in glob.glob("*.zip"):
        if f != filename:
            remove_file(f)
    
    control.set_software_version(version)
    control.save_control_to_wapt()
                            01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
881de5bb5b879d7d0dac2c313a95c3a6e4cef0efd58d80aa41f6851731abc60a : WAPT/control
2005c82ff1596419cecbae082493e594de783386a12f47a9b0d0486681a3ada9 : WAPT/icon.png
f6ea44bc40b1f4a85bc6dad48cf614bd7daa2cea9f4c78bac041f7b1ee079855 : configcat-cli_2.5.1_win-x86.zip
abf6ceb69fed489f1ee600fc8b88c6ca7634f3aa11994d5d38063c321a02a66c : luti.json
df093a35d34e6dcdf9b7619d95c168f5b6779d3cef523ab7b9a59163dbda05e7 : setup.py
6f5f8cf1eb259819aa6bfb0f80c4a2b87f92ebd6a25222b3a74c373b16ee4831 : update_package.py