From 00cb540ec9d44c0f57b444ca43824279e7d89248 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Wed, 18 Sep 2024 19:58:33 +0200 Subject: [PATCH] update conan_export_all_packages --- scripts/conan_export_all_packages.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/conan_export_all_packages.py b/scripts/conan_export_all_packages.py index fb00f49..f2ab353 100644 --- a/scripts/conan_export_all_packages.py +++ b/scripts/conan_export_all_packages.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import sys import subprocess from pathlib import Path @@ -7,17 +8,24 @@ def main(): + returncode = 0 + script_path = Path(__file__).resolve().parent root_path = script_path.parent package_infos = get_package_infos() for package in package_infos: for version in package_infos[package]: - subprocess.run( + proc = subprocess.run( ["conan", "export", version["conanfile"], "--version", version["version"]], cwd=root_path ) + if proc.returncode != 0: + print(f"Failed to export {package} {version['version']}") + returncode = proc.returncode + + return returncode if __name__ == "__main__": - main() + sys.exit(main())