Fix download of debug files for BugFix checker

This commit is contained in:
Raúl Marín 2024-07-05 11:58:35 +02:00
parent ad70710f4b
commit 8a1dd3c7c8
3 changed files with 7 additions and 7 deletions

View File

@ -13,26 +13,26 @@ from get_previous_release_tag import (
PACKAGES_DIR = Path("previous_release_package_folder") PACKAGES_DIR = Path("previous_release_package_folder")
def download_packages(release: ReleaseInfo, dest_path: Path = PACKAGES_DIR) -> None: def download_packages(release: ReleaseInfo, dest_path: Path = PACKAGES_DIR, debug: bool = False) -> None:
dest_path.mkdir(parents=True, exist_ok=True) dest_path.mkdir(parents=True, exist_ok=True)
logging.info("Will download %s", release) logging.info("Will download %s", release)
for pkg, url in release.assets.items(): for pkg, url in release.assets.items():
if not pkg.endswith("_amd64.deb") or "-dbg_" in pkg: if not pkg.endswith("_amd64.deb") or (not debug and "-dbg_" in pkg):
continue continue
pkg_name = dest_path / pkg pkg_name = dest_path / pkg
download_build_with_progress(url, pkg_name) download_build_with_progress(url, pkg_name)
def download_last_release(dest_path: Path) -> None: def download_last_release(dest_path: Path, debug: bool = False) -> None:
current_release = get_previous_release(None) current_release = get_previous_release(None)
if current_release is None: if current_release is None:
raise DownloadException("The current release is not found") raise DownloadException("The current release is not found")
download_packages(current_release, dest_path=dest_path) download_packages(current_release, dest_path=dest_path, debug=debug)
if __name__ == "__main__": if __name__ == "__main__":
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)
release = get_release_by_tag(input()) release = get_release_by_tag(input())
download_packages(release) download_packages(release, debug=True)

View File

@ -253,7 +253,7 @@ def main():
packages_path.mkdir(parents=True, exist_ok=True) packages_path.mkdir(parents=True, exist_ok=True)
if validate_bugfix_check: if validate_bugfix_check:
download_last_release(packages_path) download_last_release(packages_path, debug=True)
else: else:
download_all_deb_packages(check_name, reports_path, packages_path) download_all_deb_packages(check_name, reports_path, packages_path)

View File

@ -185,7 +185,7 @@ def main():
build_path.mkdir(parents=True, exist_ok=True) build_path.mkdir(parents=True, exist_ok=True)
if validate_bugfix_check: if validate_bugfix_check:
download_last_release(build_path) download_last_release(build_path, debug=True)
else: else:
download_all_deb_packages(check_name, reports_path, build_path) download_all_deb_packages(check_name, reports_path, build_path)