Skip to content

Commit

Permalink
make release file use uv (not tested yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier authored and oroulet committed Oct 24, 2024
1 parent 9b768c6 commit 5c530ad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@


def bump_version():
with open("setup.py") as f:
with open("pyproject.toml") as f:
s = f.read()
m = re.search(r'version="(.*)\.(.*)\.(.*)",', s)
m = re.search(r'version = "(.*)\.(.*)\.(.*)",', s)
v1, v2, v3 = m.groups()
oldv = "{0}.{1}.{2}".format(v1, v2, v3)
newv = "{0}.{1}.{2}".format(v1, v2, str(int(v3) + 1))
Expand All @@ -14,7 +14,7 @@ def bump_version():
if ans:
newv = ans
s = s.replace(oldv, newv)
with open("setup.py", "w") as f:
with open("pyproject.toml", "w") as f:
f.write(s)
return newv

Expand All @@ -33,8 +33,8 @@ def release():
ans = input("upload to pip?(Y/n)")
if ans in ("", "y", "yes"):
os.system("rm -rf dist/*")
os.system("python3 setup.py sdist bdist_wheel")
os.system("twine upload dist/*")
os.system("uv build")
os.system("uv publish")
os.system("git log -s --format=oneline")


Expand Down

0 comments on commit 5c530ad

Please sign in to comment.