Buckets:

download
raw
1.05 kB
"""
python scripts/release_branch.py anthropic bagatur
"""
import glob
import tomllib
import toml
import subprocess
import sys
def main(*args):
pkg = args[1]
if len(args) >= 2:
user = args[2]
else:
user = "auto"
for path in glob.glob("./libs/**/pyproject.toml", recursive=True):
if pkg in path:
break
with open(path, "rb") as f:
pyproject = tomllib.load(f)
major, minor, patch = pyproject["tool"]["poetry"]["version"].split(".")
patch = str(int(patch) + 1)
bumped = ".".join((major, minor, patch))
pyproject["tool"]["poetry"]["version"] = bumped
with open(path, "w") as f:
toml.dump(pyproject, f)
branch = f"{user}/{pkg}_{bumped.replace('.', '_')}"
print(
subprocess.run(
f"git checkout -b {branch}; git commit -am '{pkg}[patch]: Release {bumped}'; git push -u origin {branch}",
shell=True,
capture_output=True,
text=True,
)
)
if __name__ == "__main__":
main(*sys.argv)

Xet Storage Details

Size:
1.05 kB
·
Xet hash:
c2b3b2f1eb4d548cb1bf2c29b5301df182cb41c3eaba0c790ca8bef44bb3e60d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.