-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (23 loc) · 838 Bytes
/
Makefile
File metadata and controls
29 lines (23 loc) · 838 Bytes
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
linter:=$(shell which golangci-lint 2>/dev/null || echo $(HOME)/go/bin/golangci-lint)
.PHONY: build-static
build-static:
@mkdir -p bin/
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bin/compose-publish main.go
.PHONY: test
test:
go test ./... -v
.PHONY: fmt
fmt:
@goimports -e -w ./
.PHONY: check
check:
@test -z $(shell gofmt -l ./ | tee /dev/stderr) || echo "[WARN] Fix formatting issues with 'make fmt'"
@test -x $(linter) || (echo "Please install linter from https://github.com/golangci/golangci-lint/releases/tag/v1.25.1 to $(HOME)/go/bin")
$(linter) run
.PHONY: publish
publish: build-static
gsutil cp ./bin/compose-publish gs://subscriber_registry/compose-publish
gsutil -m acl ch -u AllUsers:R gs://subscriber_registry/compose-publish
fioapp:
@mkdir -p bin/
go build -o bin/fioapp cmd/fioapp/main.go