-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (28 loc) · 1.01 KB
/
Makefile
File metadata and controls
32 lines (28 loc) · 1.01 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
.PHONY: rerelease release dev-install dev-restore
# Build and install locally for development
dev-install:
@echo "Building CLI with prod config..."
go build -ldflags "-X 'github.com/major-technology/cli/cmd.configFile=configs/prod.json'" -o major .
@echo "Backing up current CLI..."
@cp ~/.major/bin/major ~/.major/bin/major.backup 2>/dev/null || true
@echo "Installing development build..."
@cp major ~/.major/bin/major
@rm major
@echo "Done! Run 'major --version' to verify."
# Restore original CLI from backup
dev-restore:
@echo "Restoring original CLI..."
@cp ~/.major/bin/major.backup ~/.major/bin/major
@echo "Done!"
rerelease:
@echo "Releasing version v$(VERSION)..."
git tag -d v$(VERSION)
git push origin :refs/tags/v$(VERSION)
git tag -a v$(VERSION) -m "v$(VERSION)"
git push origin v$(VERSION)
@echo "Successfully released v$(VERSION)"
release:
@echo "Releasing version v$(VERSION)..."
git tag -a v$(VERSION) -m "v$(VERSION)"
git push origin v$(VERSION)
@echo "Successfully released v$(VERSION)"