Skip to content

Commit 923fb72

Browse files
authored
Release Version 1.12.2 (#73)
* change release script * small fix to release script * Release version 1.12.2
1 parent d211674 commit 923fb72

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

.hooks/make_release_commit.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
#!/usr/bin/env python3
22
import tomli
3+
import secrets
34
import subprocess
45
from pathlib import Path
56

7+
68
def create_release_commit():
79
cwd = Path.cwd()
8-
with open(cwd / 'pyproject.toml', 'rb') as file:
10+
with open(cwd / "pyproject.toml", "rb") as file:
911
pyproject = tomli.load(file)
10-
version = pyproject['tool']['poetry']['version']
12+
version = pyproject["tool"]["poetry"]["version"]
13+
branch = f"release-{version}-{secrets.token_hex(12)}"
1114

12-
p = subprocess.Popen(f'git add . && git commit -m "Release version {version}" && git tag -a "{version}" -m "Release version {version}" && git push && git push --tags',
13-
shell=True,
14-
cwd=cwd)
15+
p = subprocess.Popen(
16+
" && ".join(
17+
[
18+
f"git checkout -b {branch}",
19+
"git add .",
20+
f'git commit -m "Release version {version}"',
21+
f'git tag -a "{version}" -m "Release version {version}"',
22+
f"git push --set-upstream origin {branch}",
23+
f"git push --tags",
24+
]
25+
),
26+
shell=True,
27+
cwd=cwd,
28+
)
1529

1630
p.wait()
1731

18-
if __name__ == '__main__':
19-
create_release_commit()
2032

33+
if __name__ == "__main__":
34+
create_release_commit()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22
name = "taskipy"
33
description = "tasks runner for python projects"
4-
version = "1.12.1"
4+
version = "1.12.2"
55
authors = ["Roy Sommer <roy@sommer.co.il>"]
66
readme = "README.md"
77
repository = "https://github.com/taskipy/taskipy"

0 commit comments

Comments
 (0)