-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* change release script * small fix to release script * Release version 1.12.2
- Loading branch information
Showing
2 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|