# Path: kiwixbuild/versions.py



import os
import tarfile
import zipfile
import subprocess
import re
import shutil
import requests
from os import environ as _environ
from pathlib import Path
from datetime import date
from kiwixbuild.versions import (
    main_project_versions,
    release_versions,
    base_deps_versions,
)
    write_manifest(manifest_file, archive_name, target, PLATFORM_TARGET)
    files_to_archive.append(manifest_file)

    relative_path = HOME
    if full:
        files_to_archive += ARCHIVE_DIR.glob(".*_ok")
        files_to_archive += BASE_DIR.glob("*/.*_ok")
        files_to_archive += (HOME / "BUILD_native_dyn").glob("*/.*_ok")
        files_to_archive += (HOME / "BUILD_native_static").glob("*/.*_ok")
        files_to_archive += HOME.glob("BUILD_android*/**/.*_ok")
        files_to_archive += SOURCE_DIR.glob("*/.*_ok")
        files_to_archive += SOURCE_DIR.glob("zim-testing-suite-*/*")
        if PLATFORM_TARGET.startswith("armhf"):
            files_to_archive += (SOURCE_DIR / "armhf").glob("*")
        toolchains_subdirs = HOME.glob("BUILD_*/TOOLCHAINS/*/*")
        for subdir in toolchains_subdirs:
            if not subdir.match("tools"):
                files_to_archive.append(subdir)

    archive_file = TMP_DIR / archive_name
    with tarfile.open(str(archive_file), "w:xz") as tar:
        for name in set(files_to_archive):
            print(".{}".format(name), flush=True)
            tar.add(str(name), arcname=str(name.relative_to(relative_path)))

    return archive_file


def get_postfix(project):
    postfix = main_project_versions[project]

# Path: kiwixbuild/versions.py



# Path: .github/scripts/common.py
import os
import tarfile
import zipfile
import subprocess
import re
import shutil
import requests
from os import environ as _environ
from pathlib import Path
from datetime import date
from kiwixbuild.versions import (
    main_project_versions,
    release_versions,
    base_deps_versions,
)

    write_manifest(manifest_file, archive_name, target, PLATFORM_TARGET)
    files_to_archive.append(manifest_file)

    relative_path = HOME
    if full:
        files_to_archive += ARCHIVE_DIR.glob(".*_ok")
        files_to_archive += BASE_DIR.glob("*/.*_ok")
        files_to_archive += (HOME / "BUILD_native_dyn").glob("*/.*_ok")
        files_to_archive += (HOME / "BUILD_native_static").glob("*/.*_ok")
        files_to_archive += HOME.glob("BUILD_android*/**/.*_ok")
        files_to_archive += SOURCE_DIR.glob("*/.*_ok")
        files_to_archive += SOURCE_DIR.glob("zim-testing-suite-*/*")
        if PLATFORM_TARGET.startswith("armhf"):
            files_to_archive += (SOURCE_DIR / "armhf").glob("*")
        toolchains_subdirs = HOME.glob("BUILD_*/TOOLCHAINS/*/*")
        for subdir in toolchains_subdirs:
            if not subdir.match("tools"):
                files_to_archive.append(subdir)

    archive_file = TMP_DIR / archive_name
    with tarfile.open(str(archive_file), "w:xz") as tar:
        for name in set(files_to_archive):
            print(".{}".format(name), flush=True)
            tar.add(str(name), arcname=str(name.relative_to(relative_path)))

    return archive_file


def get_postfix(project):
    postfix = main_project_versions[project]

    extra = release_versions.get(project)