ci: tag fixes and robustness to workflow failures (#3838)
This commit is contained in:
parent
f17de26ab0
commit
a7d1449e9d
10 changed files with 125 additions and 35 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue