forked from jacksontj/promxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (29 loc) · 727 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
35
36
BUILD := build
GO ?= go
GOFILES := $(shell find . -name "*.go" -type f ! -path "./vendor/*")
GOFMT ?= gofmt
GOIMPORTS ?= goimports -local=github.com/jacksontj/promxy
STATICCHECK ?= staticcheck
.PHONY: clean
clean:
$(GO) clean -i ./...
rm -rf $(BUILD)
.PHONY: static-check
static-check:
$(STATICCHECK) ./...
.PHONY: fmt
fmt:
$(GOFMT) -w -s $(GOFILES)
.PHONY: imports
imports:
$(GOIMPORTS) -w $(GOFILES)
.PHONY: test
test:
$(GO) test -v ./...
.PHONY: release
release:
./build.bash github.com/jacksontj/promxy/cmd/promxy $(BUILD)
./build.bash github.com/jacksontj/promxy/cmd/remote_write_exporter $(BUILD)
testlocal-build:
docker build -t 127.0.0.1:32000/promxy:latest .
docker push 127.0.0.1:32000/promxy:latest