From bd4cd34a747969f29391d031c03485fc491d017e Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 4 Oct 2024 18:19:07 +0200
Subject: [PATCH] Add docs to mingw development archive
---
build-scripts/build-release.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/build-scripts/build-release.py b/build-scripts/build-release.py
index 924792580c6d8..e84dcd5fd2ea4 100755
--- a/build-scripts/build-release.py
+++ b/build-scripts/build-release.py
@@ -362,6 +362,7 @@ def create_mingw_archives(self) -> None:
("WhatsNew.txt", ""),
("LICENSE.txt", ""),
("README.md", ""),
+ ("docs/*", "docs/"),
)
test_files = list(Path(r) / f for r, _, files in os.walk(self.root / "test") for f in files)
@@ -374,10 +375,12 @@ def create_mingw_archives(self) -> None:
logger.info("Creating %s...", tar_paths[comp])
with tarfile.open(tar_paths[comp], f"w:{comp}") as tar_object:
arc_root = f"{self.project}-{self.version}"
- for file_path, arcdirname in extra_files:
+ for file_path_glob, arcdirname in extra_files:
assert not arcdirname or arcdirname[-1] == "/"
- arcname = f"{arc_root}/{arcdirname}{Path(file_path).name}"
- tar_object.add(self.root / file_path, arcname=arcname)
+ for file_path in glob.glob(file_path_glob, root_dir=self.root):
+ file_path = self.root / file_path
+ arcname = f"{arc_root}/{arcdirname}{Path(file_path).name}"
+ tar_object.add(file_path, arcname=arcname)
for arch in mingw_archs:
install_path = arch_install_paths[arch]
arcname_parent = f"{arc_root}/{arch}-w64-mingw32"