Skip to content

Commit bc2a602

Browse files
better release system
1 parent 77a5190 commit bc2a602

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ __pycache__/
1010
.Python
1111
build/
1212
develop-eggs/
13-
#dist/ # Keep distribution folder
13+
dist/
1414
downloads/
1515
eggs/
1616
.eggs/
-41.3 KB
Binary file not shown.

dist/schemascii-0.1.0.tar.gz

-51.4 KB
Binary file not shown.

release.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import argparse
2+
import os
3+
4+
a = argparse.ArgumentParser("release.py")
5+
a.add_argument("version", help="release tag")
6+
a.add_argument("-m", "--message", default=None, help="release commit message")
7+
args = a.parse_args()
8+
if args.message is None:
9+
args.message = f"Release {args.version}"
10+
11+
12+
def cmd(sh_line):
13+
print(sh_line)
14+
os.system(sh_line)
15+
16+
17+
cmd("git add -A")
18+
cmd(f"git commit -m {args.message!r}")
19+
cmd(f"git tag {args.version}")
20+
cmd("git push --tags")

0 commit comments

Comments
 (0)