mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Fix download of debug files for BugFix checker
This commit is contained in:
parent
ad70710f4b
commit
8a1dd3c7c8
@ -13,26 +13,26 @@ from get_previous_release_tag import (
|
||||
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)
|
||||
|
||||
logging.info("Will download %s", release)
|
||||
|
||||
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
|
||||
pkg_name = dest_path / pkg
|
||||
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)
|
||||
if current_release is None:
|
||||
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__":
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
release = get_release_by_tag(input())
|
||||
download_packages(release)
|
||||
download_packages(release, debug=True)
|
||||
|
@ -253,7 +253,7 @@ def main():
|
||||
packages_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
if validate_bugfix_check:
|
||||
download_last_release(packages_path)
|
||||
download_last_release(packages_path, debug=True)
|
||||
else:
|
||||
download_all_deb_packages(check_name, reports_path, packages_path)
|
||||
|
||||
|
@ -185,7 +185,7 @@ def main():
|
||||
build_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
if validate_bugfix_check:
|
||||
download_last_release(build_path)
|
||||
download_last_release(build_path, debug=True)
|
||||
else:
|
||||
download_all_deb_packages(check_name, reports_path, build_path)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user