Skip to content

Commit

Permalink
Release Version 1.12.2 (#73)
Browse files Browse the repository at this point in the history
* change release script

* small fix to release script

* Release version 1.12.2
  • Loading branch information
illBeRoy committed Nov 23, 2023
1 parent d211674 commit 923fb72
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
28 changes: 21 additions & 7 deletions .hooks/make_release_commit.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
#!/usr/bin/env python3
import tomli
import secrets
import subprocess
from pathlib import Path


def create_release_commit():
cwd = Path.cwd()
with open(cwd / 'pyproject.toml', 'rb') as file:
with open(cwd / "pyproject.toml", "rb") as file:
pyproject = tomli.load(file)
version = pyproject['tool']['poetry']['version']
version = pyproject["tool"]["poetry"]["version"]
branch = f"release-{version}-{secrets.token_hex(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',
shell=True,
cwd=cwd)
p = subprocess.Popen(
" && ".join(
[
f"git checkout -b {branch}",
"git add .",
f'git commit -m "Release version {version}"',
f'git tag -a "{version}" -m "Release version {version}"',
f"git push --set-upstream origin {branch}",
f"git push --tags",
]
),
shell=True,
cwd=cwd,
)

p.wait()

if __name__ == '__main__':
create_release_commit()

if __name__ == "__main__":
create_release_commit()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "taskipy"
description = "tasks runner for python projects"
version = "1.12.1"
version = "1.12.2"
authors = ["Roy Sommer <[email protected]>"]
readme = "README.md"
repository = "https://github.com/taskipy/taskipy"
Expand Down

0 comments on commit 923fb72

Please sign in to comment.