Philipp Hörist pushed to branch port-pyproject at gajim / gajim

Commits:

6 changed files:

Changes:

  • .ci/appveyor_build.py deleted
    1
    -#!/usr/bin/env python3
    
    2
    -
    
    3
    -from typing import Any
    
    4
    -
    
    5
    -import json
    
    6
    -import logging
    
    7
    -import os
    
    8
    -import sys
    
    9
    -import time
    
    10
    -from pathlib import Path
    
    11
    -
    
    12
    -import requests
    
    13
    -
    
    14
    -ACCOUNT = 'lovetox'
    
    15
    -PROJECT_SLUG = 'gajim'
    
    16
    -BRANCH = 'master'
    
    17
    -BASE_URL = 'https://ci.appveyor.com/api'
    
    18
    -API_KEY = os.environ['APPVEYOR_API_KEY']
    
    19
    -HEADERS = {'Authorization': f'Bearer {API_KEY}'}
    
    20
    -RETRY_TIMEOUT = 2 * 60
    
    21
    -INITIAL_START_DELAY = 20 * 60
    
    22
    -
    
    23
    -SETTINGS_API_URL = f'{BASE_URL}/projects/{ACCOUNT}/{PROJECT_SLUG}/settings/yaml'
    
    24
    -BUILDS_API_URL = f'{BASE_URL}/builds'
    
    25
    -PROJECT_API_URL = f'{BASE_URL}/projects/{ACCOUNT}/{PROJECT_SLUG}'
    
    26
    -
    
    27
    -
    
    28
    -logging.basicConfig(level='INFO', format='%(levelname)s: %(message)s')
    
    29
    -log = logging.getLogger()
    
    30
    -
    
    31
    -
    
    32
    -def get_gajim_version() -> str:
    
    33
    -    if os.environ.get('GAJIM_NIGHTLY_BUILD') is not None:
    
    34
    -        return 'Nightly'
    
    35
    -
    
    36
    -    tag = os.environ.get('CI_COMMIT_TAG')
    
    37
    -    if tag is None:
    
    38
    -        sys.exit('No tag found')
    
    39
    -    return tag
    
    40
    -
    
    41
    -
    
    42
    -def push_yaml_to_project() -> None:
    
    43
    -    log.info('Push settings ...')
    
    44
    -    with open('.ci/appveyor.yml') as file:
    
    45
    -        yaml = file.read()
    
    46
    -
    
    47
    -    req = requests.put(SETTINGS_API_URL, data=yaml, headers=HEADERS)
    
    48
    -    req.raise_for_status()
    
    49
    -
    
    50
    -
    
    51
    -def start_build() -> str:
    
    52
    -    log.info('Start build ...')
    
    53
    -    payload = {
    
    54
    -        'accountName': ACCOUNT,
    
    55
    -        'projectSlug': PROJECT_SLUG,
    
    56
    -        'branch': BRANCH,
    
    57
    -        'commitId': os.environ['CI_COMMIT_SHA'],
    
    58
    -        'environmentVariables': {
    
    59
    -            'GAJIM_VERSION': get_gajim_version(),
    
    60
    -        }
    
    61
    -    }
    
    62
    -    req = requests.post(BUILDS_API_URL, headers=HEADERS, json=payload)
    
    63
    -    req.raise_for_status()
    
    64
    -    response = req.json()
    
    65
    -    return response['buildId']
    
    66
    -
    
    67
    -
    
    68
    -def is_build_finished(build: dict[str, str]) -> bool:
    
    69
    -    if build['status'] in ('failed', 'cancelled'):
    
    70
    -        sys.exit('Found failed job')
    
    71
    -
    
    72
    -    return build['status'] == 'success'
    
    73
    -
    
    74
    -
    
    75
    -def check_for_response(build_id: str) -> None:
    
    76
    -    time.sleep(INITIAL_START_DELAY)
    
    77
    -    while True:
    
    78
    -        time.sleep(RETRY_TIMEOUT)
    
    79
    -
    
    80
    -        log.info('Check build status ...')
    
    81
    -        req = requests.get(PROJECT_API_URL, headers=HEADERS)
    
    82
    -        req.raise_for_status()
    
    83
    -        response = req.json()
    
    84
    -        build = response['build']
    
    85
    -        if build_id != build['buildId']:
    
    86
    -            sys.exit('Unable to find buildid: %s' % build_id)
    
    87
    -
    
    88
    -        if is_build_finished(build):
    
    89
    -            break
    
    90
    -
    
    91
    -        log.info('Build status: %s', build['status'])
    
    92
    -
    
    93
    -    build_folder = Path.cwd() / 'build'
    
    94
    -    build_folder.mkdir()
    
    95
    -
    
    96
    -    for job in build['jobs']:
    
    97
    -        response = get_job_response(job['jobId'])
    
    98
    -        result = build_folder / f'{job["jobId"]}.json'
    
    99
    -        result.write_text(json.dumps(response))
    
    100
    -        log.info('Write job response: %s', result)
    
    101
    -
    
    102
    -
    
    103
    -def get_job_response(job_id: str) -> list[dict[str, Any]]:
    
    104
    -    artifacts_api_url = f'{BASE_URL}/buildjobs/{job_id}/artifacts'
    
    105
    -    req = requests.get(artifacts_api_url, headers=HEADERS)
    
    106
    -    req.raise_for_status()
    
    107
    -    response = req.json()
    
    108
    -
    
    109
    -    for artifact in response:
    
    110
    -        file_url = f'{artifacts_api_url}/{artifact["fileName"]}'
    
    111
    -        artifact['fileUrl'] = file_url
    
    112
    -
    
    113
    -    return response
    
    114
    -
    
    115
    -
    
    116
    -if __name__ == '__main__':
    
    117
    -    push_yaml_to_project()
    
    118
    -    build_id = start_build()
    
    119
    -    check_for_response(build_id)

  • .ci/debian_build.py deleted
    1
    -#!/usr/bin/env python3
    
    2
    -
    
    3
    -from __future__ import annotations
    
    4
    -
    
    5
    -import argparse
    
    6
    -import dataclasses
    
    7
    -import logging
    
    8
    -import shutil
    
    9
    -import subprocess
    
    10
    -from datetime import datetime
    
    11
    -from datetime import timezone
    
    12
    -from pathlib import Path
    
    13
    -
    
    14
    -LOG_FORMAT = '%(asctime)s %(levelname)s %(message)s'
    
    15
    -logging.basicConfig(format=LOG_FORMAT, level=logging.DEBUG)
    
    16
    -log = logging.getLogger()
    
    17
    -
    
    18
    -ROOT_DIR = Path(__file__).resolve().parent.parent
    
    19
    -BUILD_DIR = ROOT_DIR / 'debian_build'
    
    20
    -
    
    21
    -DATE = datetime.now().strftime('%Y%m%d')
    
    22
    -DATE_TIME = datetime.now(tz=timezone.utc).strftime('%a, %d %b %Y %T %z')
    
    23
    -
    
    24
    -
    
    25
    -@dataclasses.dataclass
    
    26
    -class ReleaseContext:
    
    27
    -    app: str
    
    28
    -    pkg_name: str
    
    29
    -    rev: str
    
    30
    -    release_name: str
    
    31
    -    release_dir: Path
    
    32
    -    tarball: Path
    
    33
    -
    
    34
    -    @classmethod
    
    35
    -    def from_tarball(cls, path: str, prefix: str, rev: str) -> ReleaseContext:
    
    36
    -        tarball = Path(path)
    
    37
    -        app = tarball.name.split('-', maxsplit=1)[0]
    
    38
    -        pkg_name = f'{prefix}{app}-nightly'
    
    39
    -        release_name = f'{pkg_name}_{DATE}'
    
    40
    -        release_dir = BUILD_DIR / release_name
    
    41
    -        return cls(app=app,
    
    42
    -                   pkg_name=pkg_name,
    
    43
    -                   rev=rev,
    
    44
    -                   release_name=release_name,
    
    45
    -                   release_dir=release_dir,
    
    46
    -                   tarball=tarball)
    
    47
    -
    
    48
    -
    
    49
    -def clean_build_dir() -> None:
    
    50
    -    log.info('Cleanup build directory')
    
    51
    -    if BUILD_DIR.exists():
    
    52
    -        shutil.rmtree(BUILD_DIR)
    
    53
    -    BUILD_DIR.mkdir()
    
    54
    -
    
    55
    -
    
    56
    -def prepare_package_dir(context: ReleaseContext) -> None:
    
    57
    -    log.info('Extract tarball')
    
    58
    -    tarball = Path(shutil.copy(context.tarball, BUILD_DIR))
    
    59
    -    tarball = tarball.rename(BUILD_DIR / f'{context.release_name}.orig.tar.gz')
    
    60
    -    shutil.unpack_archive(tarball, BUILD_DIR)
    
    61
    -
    
    62
    -    log.info('Rename dir to: %s', context.release_name)
    
    63
    -    folder = list(BUILD_DIR.glob(f'{context.app}-?.?.?'))[0]
    
    64
    -    folder.rename(context.release_dir)
    
    65
    -
    
    66
    -    log.info('Copy debian folder into release directory')
    
    67
    -    shutil.copytree(ROOT_DIR / 'debian', context.release_dir / 'debian')
    
    68
    -
    
    69
    -
    
    70
    -def prepare_changelog(context: ReleaseContext) -> None:
    
    71
    -    log.info('Prepare Changelog')
    
    72
    -    changelog = context.release_dir / 'debian' / 'changelog'
    
    73
    -    content = changelog.read_text()
    
    74
    -    content = content.replace('{DATE}', f'{DATE}-{context.rev}')
    
    75
    -    content = content.replace('{DATE_TIME}', DATE_TIME)
    
    76
    -    changelog.write_text(content)
    
    77
    -
    
    78
    -
    
    79
    -def build(context: ReleaseContext) -> None:
    
    80
    -    log.info('Start package build')
    
    81
    -    subprocess.run(
    
    82
    -        [
    
    83
    -            'dpkg-buildpackage',
    
    84
    -            '--no-sign'
    
    85
    -        ],
    
    86
    -        cwd=context.release_dir,
    
    87
    -        check=True)
    
    88
    -
    
    89
    -
    
    90
    -if __name__ == '__main__':
    
    91
    -    parser = argparse.ArgumentParser(description='Build debian package')
    
    92
    -    parser.add_argument('tarball', help='Path to tarball e.g. app.tar.gz')
    
    93
    -    parser.add_argument('rev', help='The package revision e.g. 1')
    
    94
    -    parser.add_argument('--pkgprefix', default='', required=False,
    
    95
    -                        help='Prefix for the package name e.g. python3-')
    
    96
    -    args = parser.parse_args()
    
    97
    -
    
    98
    -    context = ReleaseContext.from_tarball(args.tarball,
    
    99
    -                                          args.pkgprefix,
    
    100
    -                                          args.rev)
    
    101
    -
    
    102
    -    clean_build_dir()
    
    103
    -    prepare_package_dir(context)
    
    104
    -    prepare_changelog(context)
    
    105
    -    build(context)

  • .ci/deploy.py deleted
    1
    -#!/usr/bin/env python3
    
    2
    -
    
    3
    -from typing import Any
    
    4
    -from typing import cast
    
    5
    -from typing import Optional
    
    6
    -
    
    7
    -import functools
    
    8
    -import json
    
    9
    -import logging
    
    10
    -import os
    
    11
    -import sys
    
    12
    -from datetime import date
    
    13
    -from ftplib import error_perm
    
    14
    -from ftplib import FTP_TLS
    
    15
    -from pathlib import Path
    
    16
    -
    
    17
    -import requests
    
    18
    -
    
    19
    -FTP_URL = 'panoramix.gajim.org'
    
    20
    -FTP_USER = os.environ['FTP_USER']
    
    21
    -FTP_PASS = os.environ['FTP_PASS']
    
    22
    -
    
    23
    -API_KEY = os.environ['APPVEYOR_API_KEY']
    
    24
    -HEADERS = {'Authorization': f'Bearer {API_KEY}'}
    
    25
    -
    
    26
    -WINDOWS_NIGHTLY_FOLDER = 'downloads/snap/win'
    
    27
    -LINUX_NIGHTLY_FOLDER = 'downloads/snap'
    
    28
    -
    
    29
    -RELEASE_FOLDER_BASE = 'downloads'
    
    30
    -
    
    31
    -
    
    32
    -logging.basicConfig(level='INFO', format='%(levelname)s: %(message)s')
    
    33
    -log = logging.getLogger()
    
    34
    -
    
    35
    -
    
    36
    -def ftp_connection(func: Any) -> Any:
    
    37
    -    @functools.wraps(func)
    
    38
    -    def func_wrapper(filedir: Path) -> None:
    
    39
    -        ftp = FTP_TLS(FTP_URL, FTP_USER, FTP_PASS)
    
    40
    -        log.info('Successfully connected to %s', FTP_URL)
    
    41
    -        func(ftp, filedir)
    
    42
    -        ftp.quit()
    
    43
    -        log.info('Quit')
    
    44
    -        return
    
    45
    -    return func_wrapper
    
    46
    -
    
    47
    -
    
    48
    -def get_release_folder_from_tag(tag: str) -> str:
    
    49
    -    numbers = tag.split('.')
    
    50
    -    return '.'.join(numbers[:2])
    
    51
    -
    
    52
    -
    
    53
    -def get_gajim_tag() -> str:
    
    54
    -    tag = os.environ.get('CI_COMMIT_TAG')
    
    55
    -    if tag is None:
    
    56
    -        sys.exit('No tag found')
    
    57
    -    return tag
    
    58
    -
    
    59
    -
    
    60
    -def find_linux_tarball(filedir: Path) -> Path:
    
    61
    -    files = list(filedir.glob('gajim-*.tar.gz'))
    
    62
    -    if len(files) != 1:
    
    63
    -        sys.exit('Unknown files found')
    
    64
    -    return files[0]
    
    65
    -
    
    66
    -
    
    67
    -def get_dir_list(ftp: FTP_TLS) -> list[str]:
    
    68
    -    return [x[0] for x in ftp.mlsd()]
    
    69
    -
    
    70
    -
    
    71
    -def create_release_folder(ftp: FTP_TLS, tag: str) -> None:
    
    72
    -    ftp.cwd(RELEASE_FOLDER_BASE)
    
    73
    -    folder = get_release_folder_from_tag(tag)
    
    74
    -    try:
    
    75
    -        ftp.mkd(folder)
    
    76
    -    except error_perm:
    
    77
    -        pass
    
    78
    -    ftp.cwd(folder)
    
    79
    -
    
    80
    -
    
    81
    -def upload_all_from_dir(ftp: FTP_TLS, filedir: Path) -> None:
    
    82
    -    for filepath in filedir.iterdir():
    
    83
    -        upload_file(ftp, filepath)
    
    84
    -
    
    85
    -
    
    86
    -def upload_file(ftp: FTP_TLS,
    
    87
    -                filepath: Path,
    
    88
    -                name: Optional[str] = None) -> None:
    
    89
    -
    
    90
    -    if name is None:
    
    91
    -        name = filepath.name
    
    92
    -
    
    93
    -    log.info('Upload file %s as %s', filepath.name, name)
    
    94
    -    with open(filepath, 'rb') as f:
    
    95
    -        ftp.storbinary('STOR ' + name, f)
    
    96
    -
    
    97
    -
    
    98
    -def download_artifacts(path: Path) -> None:
    
    99
    -    build_results = list(path.glob('*.json'))
    
    100
    -    if not build_results:
    
    101
    -        sys.exit('No build build_results found')
    
    102
    -
    
    103
    -    responses = [json.loads(response.read_text()) for response in build_results]
    
    104
    -
    
    105
    -    for response in responses:
    
    106
    -        for artifact in response:
    
    107
    -            filename = cast(str, artifact['fileName'])
    
    108
    -            file_url = artifact['fileUrl']
    
    109
    -
    
    110
    -            log.info('Download %s', filename)
    
    111
    -
    
    112
    -            req = requests.get(file_url, headers=HEADERS)
    
    113
    -            req.raise_for_status()
    
    114
    -            with open(path / filename, 'wb') as file:
    
    115
    -                file.write(req.content)
    
    116
    -
    
    117
    -    for result in build_results:
    
    118
    -        result.unlink()
    
    119
    -
    
    120
    -
    
    121
    -def get_deploy_method() -> str:
    
    122
    -    deploy_type = os.environ['DEPLOY_TYPE']
    
    123
    -    is_nightly = bool(os.environ.get('GAJIM_NIGHTLY_BUILD'))
    
    124
    -    if is_nightly:
    
    125
    -        return f'deploy_{deploy_type}_nightly'
    
    126
    -    return f'deploy_{deploy_type}_release'
    
    127
    -
    
    128
    -
    
    129
    -@ftp_connection
    
    130
    -def deploy_windows_nightly(ftp: FTP_TLS, filedir: Path) -> None:
    
    131
    -    ftp.cwd(WINDOWS_NIGHTLY_FOLDER)
    
    132
    -    download_artifacts(filedir)
    
    133
    -    upload_all_from_dir(ftp, filedir)
    
    134
    -
    
    135
    -
    
    136
    -@ftp_connection
    
    137
    -def deploy_windows_release(ftp: FTP_TLS, filedir: Path) -> None:
    
    138
    -    tag = get_gajim_tag()
    
    139
    -    create_release_folder(ftp, tag)
    
    140
    -    download_artifacts(filedir)
    
    141
    -    upload_all_from_dir(ftp, filedir)
    
    142
    -
    
    143
    -
    
    144
    -@ftp_connection
    
    145
    -def deploy_linux_nightly(ftp: FTP_TLS, filedir: Path) -> None:
    
    146
    -    ftp.cwd(LINUX_NIGHTLY_FOLDER)
    
    147
    -    filepath = find_linux_tarball(filedir)
    
    148
    -    filename = f'gajim-{date.today().isoformat()}.tar.gz'
    
    149
    -    upload_file(ftp, filepath, name=filename)
    
    150
    -
    
    151
    -
    
    152
    -@ftp_connection
    
    153
    -def deploy_linux_release(ftp: FTP_TLS, file: Path) -> None:
    
    154
    -    tag = get_gajim_tag()
    
    155
    -    create_release_folder(ftp, tag)
    
    156
    -    filepath = find_linux_tarball(filedir)
    
    157
    -    filename = f'gajim-{tag}.tar.gz'
    
    158
    -    upload_file(ftp, filepath, name=filename)
    
    159
    -
    
    160
    -
    
    161
    -if __name__ == '__main__':
    
    162
    -    filedir = Path(sys.argv[1])
    
    163
    -    current_module = sys.modules[__name__]
    
    164
    -    method = getattr(current_module, get_deploy_method())
    
    165
    -    method(filedir)

  • .gitlab-ci.yml
    ... ... @@ -2,7 +2,7 @@ image: gajim-master:latest
    2 2
     
    
    3 3
     workflow:
    
    4 4
       rules:
    
    5
    -    - if: $GAJIM_NIGHTLY_BUILD
    
    5
    +    - if: $NIGHTLY_BUILD
    
    6 6
         - if: $CI_PIPELINE_SOURCE == "push"
    
    7 7
     
    
    8 8
     stages:
    
    ... ... @@ -16,8 +16,8 @@ test-other:
    16 16
       script:
    
    17 17
         - codespell gajim
    
    18 18
         - pip3 install build
    
    19
    -    - python3 -m build -w
    
    20
    -    - appstream-util validate dist/share/metainfo/org.gajim.Gajim.appdata.xml
    
    19
    +    - python3 -m build
    
    20
    +    - appstream-util validate dist/metadata/org.gajim.Gajim.appdata.xml
    
    21 21
       interruptible: true
    
    22 22
     
    
    23 23
     test-pyright:
    
    ... ... @@ -68,62 +68,162 @@ test-unittest:
    68 68
             path: coverage.xml
    
    69 69
       interruptible: true
    
    70 70
     
    
    71
    -build-linux:
    
    71
    +build-unix:
    
    72 72
       image: gajim-deb-build:latest
    
    73 73
       stage: build
    
    74 74
       dependencies: []
    
    75 75
       rules:
    
    76
    -    - if: '$GAJIM_NIGHTLY_BUILD'
    
    76
    +    - if: '$NIGHTLY_BUILD'
    
    77 77
         - if: '$CI_COMMIT_TAG'
    
    78 78
       script:
    
    79
    -    - apt-get update
    
    80
    -    - apt-get install -y python3-nbxmpp-nightly
    
    81 79
         - pip3 install build
    
    82
    -    - python3 -m build -s
    
    83
    -    - python3 .ci/debian_build.py "$(find dist/gajim-*)" 1
    
    80
    +    - python3 -m build
    
    84 81
     
    
    85 82
       artifacts:
    
    86 83
         name: "gajim-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA"
    
    87 84
         expire_in: 1 week
    
    88 85
         paths:
    
    89 86
           - dist/gajim-*.tar.gz
    
    87
    +      - dist/gajim-*.whl
    
    88
    +
    
    89
    +build-debian-nightly:
    
    90
    +  image: gajim-deb-build:latest
    
    91
    +  stage: build
    
    92
    +  dependencies:
    
    93
    +    - build-unix
    
    94
    +  rules:
    
    95
    +    - if: '$NIGHTLY_BUILD'
    
    96
    +  script:
    
    97
    +    - apt-get update
    
    98
    +    - apt-get install -y python3-nbxmpp-nightly
    
    99
    +    - release-helper build-debian-pkg "$(find dist/gajim-*.tar.gz)" 1 --pkgsuffix=nightly
    
    100
    +
    
    101
    +  artifacts:
    
    102
    +    name: "gajim-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA"
    
    103
    +    expire_in: 1 week
    
    104
    +    paths:
    
    105
    +      - debian_build/*
    
    90 106
     
    
    91 107
     build-windows:
    
    92 108
       stage: build
    
    93 109
       dependencies: []
    
    94 110
       rules:
    
    95
    -    - if: '$GAJIM_NIGHTLY_BUILD'
    
    96 111
         - if: '$CI_COMMIT_TAG'
    
    97 112
       script:
    
    98
    -    - python3 .ci/appveyor_build.py
    
    113
    +    - >
    
    114
    +      release-helper build-windows-pkg \
    
    115
    +        --account=lovetox \
    
    116
    +        --slug=gajim \
    
    117
    +        --branch=master \
    
    118
    +        --tag=$CI_COMMIT_TAG \
    
    119
    +        --commit-sha=$CI_COMMIT_SHA \
    
    120
    +        --api-key=$APPVEYOR_API_KEY \
    
    121
    +        .ci/appveyor.yml
    
    122
    +  artifacts:
    
    123
    +    expire_in: 1 day
    
    124
    +    paths:
    
    125
    +      - windows_build/*.json
    
    126
    +
    
    127
    +build-windows-nightly:
    
    128
    +  stage: build
    
    129
    +  dependencies: []
    
    130
    +  rules:
    
    131
    +    - if: '$NIGHTLY_BUILD'
    
    132
    +  script:
    
    133
    +    - >
    
    134
    +      release-helper build-windows-pkg \
    
    135
    +        --account=lovetox \
    
    136
    +        --slug=gajim \
    
    137
    +        --branch=master \
    
    138
    +        --tag=Nightly \
    
    139
    +        --commit-sha=$CI_COMMIT_SHA \
    
    140
    +        --api-key=$APPVEYOR_API_KEY \
    
    141
    +        .ci/appveyor.yml
    
    99 142
       artifacts:
    
    100 143
         expire_in: 1 day
    
    101 144
         paths:
    
    102
    -      - build/*.json
    
    145
    +      - windows_build/*.json
    
    103 146
     
    
    104
    -deploy-linux:
    
    147
    +deploy-unix:
    
    105 148
       stage: deploy
    
    106 149
       dependencies:
    
    107
    -    - build-linux
    
    150
    +    - build-unix
    
    108 151
       rules:
    
    109
    -    - if: '$GAJIM_NIGHTLY_BUILD'
    
    110 152
         - if: '$CI_COMMIT_TAG'
    
    111
    -  variables:
    
    112
    -    DEPLOY_TYPE: "linux"
    
    113 153
       script:
    
    114
    -    - python3 .ci/deploy.py dist
    
    154
    +    - >
    
    155
    +      release-helper deploy-to-ftp \
    
    156
    +        --host=$FTP_HOST \
    
    157
    +        --user=$FTP_USER \
    
    158
    +        --password=$FTP_PASS \
    
    159
    +        --directory=downloads/"$(echo $CI_COMMIT_TAG | cut -c 1-3)" \
    
    160
    +        --rename=gajim-$CI_COMMIT_TAG.tar.gz \
    
    161
    +        "$(find dist/gajim-*.tar.gz)"
    
    162
    +
    
    163
    +deploy-unix-nightly:
    
    164
    +  stage: deploy
    
    165
    +  dependencies:
    
    166
    +    - build-unix
    
    167
    +  rules:
    
    168
    +    - if: '$NIGHTLY_BUILD'
    
    169
    +  script:
    
    170
    +    - >
    
    171
    +      release-helper deploy-to-ftp \
    
    172
    +        --host=$FTP_HOST \
    
    173
    +        --user=$FTP_USER \
    
    174
    +        --password=$FTP_PASS \
    
    175
    +        --directory=downloads/snap" \
    
    176
    +        --rename=gajim-"$(date +'%Y-%m-%d')".tar.gz \
    
    177
    +        "$(find dist/gajim-*.tar.gz)"
    
    178
    +
    
    179
    +deploy-debian-nightly:
    
    180
    +  stage: deploy
    
    181
    +  dependencies:
    
    182
    +    - build-debian-nightly
    
    183
    +  rules:
    
    184
    +    - if: '$NIGHTLY_BUILD'
    
    185
    +  script:
    
    186
    +    - >
    
    187
    +      release-helper deploy-to-ftp \
    
    188
    +        --host=$FTP_HOST \
    
    189
    +        --user=$FTP_USER \
    
    190
    +        --password=$FTP_PASS \
    
    191
    +        --directory=debian/gajim/"$(date +'%Y%m%d')" \
    
    192
    +        debian_build
    
    115 193
     
    
    116 194
     deploy-windows:
    
    117 195
       stage: deploy
    
    118 196
       dependencies:
    
    119 197
         - build-windows
    
    120 198
       rules:
    
    121
    -    - if: '$GAJIM_NIGHTLY_BUILD'
    
    122 199
         - if: '$CI_COMMIT_TAG'
    
    123
    -  variables:
    
    124
    -    DEPLOY_TYPE: "windows"
    
    125 200
       script:
    
    126
    -    - python3 .ci/deploy.py build
    
    201
    +    - release-helper download-appveyor-artifacts "$(find windows_build/*.json)" windows_build
    
    202
    +    - rm windows_build/*.json
    
    203
    +    - >
    
    204
    +      release-helper deploy-to-ftp \
    
    205
    +        --host=$FTP_HOST \
    
    206
    +        --user=$FTP_USER \
    
    207
    +        --password=$FTP_PASS \
    
    208
    +        --directory=downloads/"$(echo $CI_COMMIT_TAG | cut -c 1-3)" \
    
    209
    +        windows_build
    
    210
    +
    
    211
    +deploy-windows-nightly:
    
    212
    +  stage: deploy
    
    213
    +  dependencies:
    
    214
    +    - build-windows-nightly
    
    215
    +  rules:
    
    216
    +    - if: '$NIGHTLY_BUILD'
    
    217
    +  script:
    
    218
    +    - release-helper download-appveyor-artifacts "$(find windows_build/*.json)" windows_build
    
    219
    +    - rm windows_build/*.json
    
    220
    +    - >
    
    221
    +      release-helper deploy-to-ftp \
    
    222
    +        --host=$FTP_HOST \
    
    223
    +        --user=$FTP_USER \
    
    224
    +        --password=$FTP_PASS \
    
    225
    +        --directory=downloads/snap" \
    
    226
    +        windows_build
    
    127 227
     
    
    128 228
     deploy-flatpak:
    
    129 229
       image: git-deploy:latest
    

  • MANIFEST.in
    ... ... @@ -3,4 +3,5 @@ include ChangeLog
    3 3
     recursive-include pep517build *
    
    4 4
     recursive-include po *
    
    5 5
     recursive-include data *.1 *.in
    
    6
    -recursive-include test *
    \ No newline at end of file
    6
    +recursive-include test *
    
    7
    +prune */__pycache__

  • debian/control
    ... ... @@ -65,6 +65,7 @@ Recommends:
    65 65
         python3-sentry-sdk,
    
    66 66
     Suggests:
    
    67 67
         libxss1,
    
    68
    +Breaks: gajim
    
    68 69
     Description: Fully-featured XMPP chat client
    
    69 70
      Gajim aims to be an easy to use and fully-featured XMPP client.
    
    70 71
      Just chat with your friends or family, easily share pictures and