Skip to content

Commit 5c530ad

Browse files
Olivieroroulet
Olivier
authored andcommitted
make release file use uv (not tested yet)
1 parent 9b768c6 commit 5c530ad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

release.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44

55
def bump_version():
6-
with open("setup.py") as f:
6+
with open("pyproject.toml") as f:
77
s = f.read()
8-
m = re.search(r'version="(.*)\.(.*)\.(.*)",', s)
8+
m = re.search(r'version = "(.*)\.(.*)\.(.*)",', s)
99
v1, v2, v3 = m.groups()
1010
oldv = "{0}.{1}.{2}".format(v1, v2, v3)
1111
newv = "{0}.{1}.{2}".format(v1, v2, str(int(v3) + 1))
@@ -14,7 +14,7 @@ def bump_version():
1414
if ans:
1515
newv = ans
1616
s = s.replace(oldv, newv)
17-
with open("setup.py", "w") as f:
17+
with open("pyproject.toml", "w") as f:
1818
f.write(s)
1919
return newv
2020

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

4040

0 commit comments

Comments
 (0)