-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (29 loc) · 942 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# usage:
# make release tag=2.7.0
#In case a tag has been pushed to GitHub, but the release failed, run `
# git tag --delete v2.7.0
# git push --delete origin v2.7.0
# and repeat the steps below
format:
mypy --check-untyped-defs "toc"
ruff check --fix "toc"
ruff format "toc"
git status
test:
python -m unittest
tag:
git status
grep -q $(tag) pyproject.toml || sed -i pyproject.toml -e "s|version = .*|version = \"$(tag)\"|" && git add pyproject.toml
git status
echo "Abort now if there are files that needs to be committed other than pyproject.toml!"
sleep 10
git tag v$(tag) -m "v$(tag)"
# enter "v2.7.0"
git-cliff -c pyproject.toml > CHANGELOG.md
#toc -lf .tocfiles
git tag --delete v$(tag)
git add CHANGELOG.md && git commit -m "minor: updated CHANGELOG.md to $(tag)"
git tag -fa v$(tag) -m "v$(tag)"
git push --follow-tags
echo "Remember to update the AUR package once deployed to PyPI!"
release: format test tag