Cycle pip wheel cache on dev version bump [CI] (#65791)
This commit is contained in:
parent
fd7e2e76e7
commit
633aad3a60
2 changed files with 26 additions and 7 deletions
|
@ -131,6 +131,23 @@ def write_version_metadata(version: Version) -> None:
|
|||
fp.write(content)
|
||||
|
||||
|
||||
def write_ci_workflow(version: Version) -> None:
|
||||
"""Update ci workflow with new version."""
|
||||
with open(".github/workflows/ci.yaml") as fp:
|
||||
content = fp.read()
|
||||
|
||||
short_version = ".".join(str(version).split(".", maxsplit=2)[:2])
|
||||
content = re.sub(
|
||||
r"(\n\W+HA_SHORT_VERSION: )\d{4}\.\d{1,2}\n",
|
||||
f"\\g<1>{short_version}\n",
|
||||
content,
|
||||
count=1,
|
||||
)
|
||||
|
||||
with open(".github/workflows/ci.yaml", "w") as fp:
|
||||
fp.write(content)
|
||||
|
||||
|
||||
def main():
|
||||
"""Execute script."""
|
||||
parser = argparse.ArgumentParser(description="Bump version of Home Assistant")
|
||||
|
@ -154,6 +171,7 @@ def main():
|
|||
|
||||
write_version(bumped)
|
||||
write_version_metadata(bumped)
|
||||
write_ci_workflow(bumped)
|
||||
|
||||
if not arguments.commit:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue