-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (15 loc) · 750 Bytes
/
Makefile
File metadata and controls
21 lines (15 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.PHONY: build clean install release
VERSION ?= $(shell git describe --tags --always --dirty)
build:
go build -ldflags "-X main.version=$(VERSION)" -o secclear ./cmd/secclear
clean:
rm -f secclear secclear-*
install: build
sudo mv secclear /usr/local/bin/
release:
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o secclear-linux-amd64 ./cmd/secclear
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o secclear-darwin-amd64 ./cmd/secclear
GOOS=darwin GOARCH=arm64 go build -ldflags "-X main.version=$(VERSION)" -o secclear-darwin-arm64 ./cmd/secclear
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o secclear-windows-amd64.exe ./cmd/secclear
test:
go test ./...