-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
28 lines (24 loc) · 1.06 KB
/
makefile
File metadata and controls
28 lines (24 loc) · 1.06 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
default: build
test:
@go test ./... -timeout 120s
build: test
@echo "compiling..."
@GOOS=darwin GOARCH=amd64 go build -o stream-exec_darwin_amd64 main.go
@GOOS=darwin GOARCH=arm64 go build -o stream-exec_darwin_arm64 main.go
@GOOS=linux GOARCH=amd64 go build -o stream-exec_linux_amd64 main.go
@GOOS=linux GOARCH=arm64 go build -o stream-exec_linux_arm64 main.go
bump-minor:
@current=$$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0"); \
major=$$(echo $$current | sed 's/v//' | cut -d. -f1); \
minor=$$(echo $$current | sed 's/v//' | cut -d. -f2); \
next="v$${major}.$$(( minor + 1 )).0"; \
echo "$$current → $$next"; \
git tag $$next && git push origin $$next
bump-patch:
@current=$$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0"); \
major=$$(echo $$current | sed 's/v//' | cut -d. -f1); \
minor=$$(echo $$current | sed 's/v//' | cut -d. -f2); \
patch=$$(echo $$current | sed 's/v//' | cut -d. -f3); \
next="v$${major}.$${minor}.$$(( patch + 1 ))"; \
echo "$$current → $$next"; \
git tag $$next && git push origin $$next