Skip to content

Commit c3d2ccb

Browse files
committed
Tweak Makefile to also add git tags
Signed-off-by: Martin Prpič <martin.prpic@gmail.com>
1 parent 6cc3282 commit c3d2ccb

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

Makefile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
.PHONY: docs build bump-minor bump-major publish publish-test
1+
.PHONY: bump-minor bump-major build publish publish-test
22

3-
build:
4-
rm -rf dist/
5-
uv build
3+
define commit-tag-push
4+
git add . && git commit
5+
git tag $$(uv version)
6+
@git show HEAD
7+
@read -p "Push to remote? [y/N] " confirm && [ "$$confirm" = "y" ] && git push --follow-tags || echo "Skipped push."
8+
endef
69

710
bump-minor:
811
uv version --bump minor
9-
git add . && git commit
10-
@read -p "Push to remote? [y/N] " confirm && [ "$$confirm" = "y" ] && git push || echo "Skipped push."
12+
$(commit-tag-push)
1113

1214
bump-major:
1315
uv version --bump major
14-
git add . && git commit
15-
@read -p "Push to remote? [y/N] " confirm && [ "$$confirm" = "y" ] && git push || echo "Skipped push."
16+
$(commit-tag-push)
17+
18+
build:
19+
rm -rf dist/
20+
uv build
1621

1722
publish:
1823
uv publish

0 commit comments

Comments
 (0)