aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 86a8f78c017abd232a276669f11b7a0d6ee9654e (plain) (blame)
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
XGOARCH := amd64
XGOOS := linux
XBIN := $(XGOOS)_$(XGOARCH)/atb

all: test vet tools install

fmt:
	go fmt ./...

test:
	go test ./...

vet:
	go vet ./...

# https://github.com/golang/go/issues/25922
# https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
tools:
	go generate -tags tools ./...

install:
	go install ./...

xinstall:
	env GOOS=$(XGOOS) GOARCH=$(XGOARCH) go install ./...

publish:
ifndef DEST_PATH
	$(error DEST_PATH must be set when publishing)
endif
	rsync -a $(GOPATH)/bin/$(XBIN) $(DEST_PATH)/$(XBIN)
	@sha256sum $(GOPATH)/bin/$(XBIN)