ci: tag fixes and robustness to workflow failures (#3838)

This commit is contained in:
Jordan Frazier 2024-09-17 18:03:48 -07:00 committed by GitHub
commit a7d1449e9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 125 additions and 35 deletions

View file

@ -48,6 +48,11 @@ def create_tag(build_type: str):
new_nightly_version = latest_base_version + ".dev" + build_number
# Prepend "v" to the version, if DNE.
# This is an update to the nightly version format.
if not new_nightly_version.startswith("v"):
new_nightly_version = "v" + new_nightly_version
# X.Y.Z.dev.YYYYMMDD
# This takes the base version of the current version and appends the
# current date. If the last release was on the same day, we exit, as

View file

@ -29,7 +29,7 @@ def update_base_dep(pyproject_path: str, new_version: str) -> None:
if not pattern.search(content):
raise Exception(f'langflow-base dependency not found in "{filepath}"')
replacement = f'langflow-base-nightly = "^{new_version}"'
replacement = f'langflow-base-nightly = "{new_version}"'
content = pattern.sub(replacement, content)
with open(filepath, "w") as file:
@ -54,6 +54,10 @@ def main() -> None:
raise Exception("New version not specified")
base_version = sys.argv[1]
# Strip "v" prefix from version if present
if base_version.startswith("v"):
base_version = base_version[1:]
verify_pep440(base_version)
update_base_dep("pyproject.toml", base_version)

View file

@ -42,6 +42,11 @@ def main() -> None:
if len(sys.argv) != 3:
raise Exception("New version not specified")
new_version = sys.argv[1]
# Strip "v" prefix from version if present
if new_version.startswith("v"):
new_version = new_version[1:]
build_type = sys.argv[2]
verify_pep440(new_version)

View file

@ -41,6 +41,10 @@ def is_development_release(version):
def update_pyproject_dependency(pyproject_path, version, is_nightly):
# Strip "v" prefix from version if present
if version.startswith("v"):
version = version[1:]
pattern = re.compile(r'langflow-base = \{ path = "\./src/backend/base", develop = true \}')
if is_nightly:
# NOTE: This process can be simplified; see the note in update_lf_base_dependency.py