Make sure haiku.rag always requires same version of haiku.rag-slim
This commit is contained in:
parent
ca2445d869
commit
6e24d5772b
2 changed files with 14 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ classifiers = [
|
||||||
"Typing :: Typed",
|
"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]
|
[project.scripts]
|
||||||
haiku-rag = "haiku.rag.cli:cli"
|
haiku-rag = "haiku.rag.cli:cli"
|
||||||
|
|
|
||||||
|
|
@ -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())}")
|
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:
|
def update_changelog(changelog_path: Path, new_version: str) -> None:
|
||||||
"""Update CHANGELOG.md with new version."""
|
"""Update CHANGELOG.md with new version."""
|
||||||
content = changelog_path.read_text()
|
content = changelog_path.read_text()
|
||||||
|
|
@ -121,6 +131,9 @@ def main():
|
||||||
for file in pyproject_files:
|
for file in pyproject_files:
|
||||||
update_version_in_file(file, new_version)
|
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.md
|
||||||
update_changelog(changelog_file, new_version)
|
update_changelog(changelog_file, new_version)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue