1 .PHONY: help release patch minor major custom
2
3 help:
4 @echo "Release commands:"
5 @echo " make patch"
6 @echo " make minor"
7 @echo " make major"
8 @echo " make custom VERSION=0.3.40"
9
10 release:
11 @test -n "$(BUMP)" || (echo "BUMP is required" && exit 1)
12 @if [ "$(BUMP)" = "custom" ] && [ -z "$(VERSION)" ]; then echo "VERSION is required for custom releases"; exit 1; fi
13 @if [ "$(BUMP)" = "custom" ]; then \
14 cargo workspaces version custom "$(VERSION)" --yes --no-git-push --allow-branch "*" --force "*"; \
15 else \
16 cargo workspaces version "$(BUMP)" --yes --no-git-push --allow-branch "*" --force "*"; \
17 fi
18 @echo "Release version prepared locally."
19 @echo "Next: git push origin $$(git branch --show-current) && git push origin --tags"
20
21 patch:
22 @$(MAKE) release BUMP=patch
23
24 minor:
25 @$(MAKE) release BUMP=minor
26
27 major:
28 @$(MAKE) release BUMP=major
29
30 custom:
31 @$(MAKE) release BUMP=custom VERSION="$(VERSION)"