-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (23 loc) · 921 Bytes
/
Makefile
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
33
34
M = $(shell printf "\033[34;1m▶\033[0m")
all: build
dep: ; $(info $(M) Ensuring dependencies)
go get github.com/ahmetb/govvv
go get github.com/dmarkham/[email protected]
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/[email protected]
gen: ; $(info $(M) Generating files)
go generate .
clean: ; $(info $(M) Cleaning)
rm -f homlet
test: clean ; $(info $(M) Launching tests)
go test $(TEST_FLAGS) ./...
fmt: ; $(info $(M) Formatting code)
gofmt -s -w .
lint: ; $(info $(M) Linting)
golangci-lint run
tidy: ; $(info $(M) Tidying)
go mod tidy
build: clean ; $(info $(M) Building)
go build -ldflags "$(shell govvv -flags -pkg $(shell go list ./pkg/version)) -s -w" ./cmd/homlet
rpi: clean ; $(info $(M) Building raspberry pi binary)
GOOS=linux GOARCH=arm GOARM=5 go build -ldflags "$(shell govvv -flags -pkg $(shell go list ./pkg/version)) -s -w" ./cmd/homlet
release: gen lint build tidy