-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
18 lines (13 loc) · 814 Bytes
/
Makefile
File metadata and controls
18 lines (13 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
.PHONY: build test clean build-all
build:
CGO_ENABLED=0 go build -ldflags "-X main.version=$(VERSION)" -o bin/edge-node ./cmd/edge-node/
test:
go test ./...
clean:
rm -rf bin/
build-all:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version=$(VERSION)" -o bin/edge-node-linux-amd64 ./cmd/edge-node/
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-X main.version=$(VERSION)" -o bin/edge-node-linux-arm64 ./cmd/edge-node/
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-X main.version=$(VERSION)" -o bin/edge-node-darwin-arm64 ./cmd/edge-node/
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version=$(VERSION)" -o bin/edge-node-windows-amd64.exe ./cmd/edge-node/