ci: update nightly script to support other version operators (#8980)

This commit is contained in:
Gabriel Luiz Freitas Almeida 2025-07-10 10:02:04 -03:00 committed by GitHub
commit 75e930d847
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,8 +16,10 @@ def update_uv_dep(base_version: str) -> None:
content = pyproject_path.read_text(encoding="utf-8")
# For the main project, update the langflow-base dependency in the UV section
# Updated pattern to handle PEP 440 version suffixes (.post, .dev, .a, .b, .rc, etc.)
pattern = re.compile(r'(dependencies\s*=\s*\[\s*\n\s*)("langflow-base==[\d.]+(?:\.(?:post|dev|a|b|rc)\d+)*")')
# Updated pattern to handle PEP 440 version suffixes and both ~= and == version specifiers
pattern = re.compile(
r'(dependencies\s*=\s*\[\s*\n\s*)("langflow-base(?:~=|==)[\d.]+(?:\.(?:post|dev|a|b|rc)\d+)*")'
)
replacement = rf'\1"langflow-base-nightly=={base_version}"'
# Check if the pattern is found