def make_zipfile()

in infra/upload_assets.py [0:0]


def make_zipfile(source_dir: str) -> str:
    """Makes a zip file for the sourc directory

    Args:
        source_dir (str): The source directory to zip

    Returns:
        str: Returns the zip filename created
    """
    output_filename = source_dir + ".zip"
    with zipfile.ZipFile(output_filename, "w", zipfile.ZIP_DEFLATED) as zip:
        for root, dirs, files in os.walk(source_dir):
            for file in files:
                filename = os.path.join(root, file)
                if zip_filter(filename):
                    arcname = os.path.join(os.path.relpath(root, source_dir), file)
                    zip.write(filename, arcname)
    return output_filename