-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
23 lines (20 loc) · 861 Bytes
/
Makefile
File metadata and controls
23 lines (20 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.PHONY: update release patch minor major
# ── make update [v=patch|minor|major] ─────────────────────────────────────────
# Bumps the version, commits, tags, and pushes — triggering a GitHub release.
#
# Usage:
# make update # bump patch (0.7.3 → 0.7.4)
# make update v=minor # bump minor (0.7.3 → 0.8.0)
# make update v=major # bump major (0.7.3 → 1.0.0)
v ?= patch
update:
@echo "→ Bumping $(v) version..."
@npm version $(v) --no-git-tag-version
@VERSION=$$(node -p "require('./package.json').version"); \
echo "→ Version: $$VERSION"; \
git add package.json; \
git commit -m "release: v$$VERSION"; \
git push; \
git tag v$$VERSION; \
git push origin v$$VERSION; \
echo "✓ Released v$$VERSION — GitHub Actions is building now."