From 6e24d5772b87e766b316e6af57ee695060a25f0d Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Wed, 26 Nov 2025 17:14:58 +0200 Subject: [PATCH] Make sure haiku.rag always requires same version of haiku.rag-slim --- pyproject.toml | 2 +- scripts/bump_version.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 86db131f..050e74e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ classifiers = [ "Typing :: Typed", ] -dependencies = ["haiku.rag-slim[docling,voyageai,mxbai,cohere,zeroentropy,inspector]"] +dependencies = ["haiku.rag-slim[docling,voyageai,mxbai,cohere,zeroentropy,inspector]==0.19.1"] [project.scripts] haiku-rag = "haiku.rag.cli:cli" diff --git a/scripts/bump_version.py b/scripts/bump_version.py index 2d88dceb..daa4f148 100755 --- a/scripts/bump_version.py +++ b/scripts/bump_version.py @@ -31,6 +31,16 @@ def update_version_in_file(file_path: Path, new_version: str) -> None: print(f"✓ Updated {file_path.relative_to(Path.cwd())}") +def update_dependency_version(file_path: Path, new_version: str) -> None: + """Update haiku.rag-slim dependency version in root pyproject.toml.""" + content = file_path.read_text() + updated = re.sub( + r"(haiku\.rag-slim\[.*?\])==[0-9.]+", rf"\1=={new_version}", content + ) + file_path.write_text(updated) + print(f"✓ Updated haiku.rag-slim dependency in {file_path.relative_to(Path.cwd())}") + + def update_changelog(changelog_path: Path, new_version: str) -> None: """Update CHANGELOG.md with new version.""" content = changelog_path.read_text() @@ -121,6 +131,9 @@ def main(): for file in pyproject_files: update_version_in_file(file, new_version) + # Update haiku.rag-slim dependency version in root pyproject.toml + update_dependency_version(pyproject_files[0], new_version) + # Update CHANGELOG.md update_changelog(changelog_file, new_version)