forked from remnawave/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (33 loc) · 1.33 KB
/
Makefile
File metadata and controls
42 lines (33 loc) · 1.33 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
.PHONY: bump-patch bump-minor bump-major help tag-release
# Default target
help:
@echo "Available targets:"
@echo " bump-patch - Bump patch version (x.x.X) and install dependencies"
@echo " bump-minor - Bump minor version (x.X.x) and install dependencies"
@echo " bump-major - Bump major version (X.x.x) and install dependencies"
@echo " tag-release - Create and push git tag for current version"
# Bump patch version (0.0.1 -> 0.0.2)
bump-patch:
@echo "Bumping patch version..."
npm version patch --no-git-tag-version
@echo "New version: $$(node -p "require('./package.json').version")"
npm install
# Bump minor version (0.1.0 -> 0.2.0)
bump-minor:
@echo "Bumping minor version..."
npm version minor --no-git-tag-version
@echo "New version: $$(node -p "require('./package.json').version")"
npm install
# Bump major version (1.0.0 -> 2.0.0)
bump-major:
@echo "Bumping major version..."
npm version major --no-git-tag-version
@echo "New version: $$(node -p "require('./package.json').version")"
npm install
# Create and push git tag for current version
tag-release:
@VERSION=$$(node -p "require('./package.json').version") && \
echo "Creating signed tag for version $$VERSION..." && \
git tag -s "$$VERSION" -m "Release $$VERSION" && \
git push origin --follow-tags && \
echo "Signed tag $$VERSION created and pushed"