-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (37 loc) · 1.04 KB
/
Makefile
File metadata and controls
50 lines (37 loc) · 1.04 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# usage:
# make release tag=1.0.0
#In case a tag has been pushed to GitHub, but the release failed, run `
# git tag --delete v1.0.0
# git push --delete origin v1.0.0
# and repeat the steps below
install:
uv sync --all-groups
lint:
ty check .
ruff check --fix .
ruff format .
test:
uv run bash tests/tests.sh
ci:
act --workflows ".github/workflows/from_commit_to_build_test.yml"
toc:
find * -type f ! -name 'CHANGELOG.md' -exec toc -f {} \; 2>/dev/null
review:
git status
echo "Abort now if there are files that needs to be committed"
sleep 10
tag_bump:
grep -q $(tag) pyproject.toml || sed -i pyproject.toml -e "s|version = .*|version = \"$(tag)\"|"
tag_changelog:
git tag v$(tag) -m v$(tag)
# enter "v1.0.0"
git-cliff -c pyproject.toml > CHANGELOG.md
tag_commit_new_changelog:
git tag --delete v$(tag)
git add --all || true
git commit -m "minor: release $(tag)" || true
git tag -fa v$(tag) -m v$(tag)
tag_publish::
git push --follow-tags
tag: tag_bump tag_changelog tag_commit_new_changelog tag_publish
release: lint toc review tag