forked from bep/s3deploy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (28 loc) · 838 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
GO ?= GO15VENDOREXPERIMENT=1 go
GOPATH := $(firstword $(subst :, ,$(shell $(GO) env GOPATH)))
GOLINTER ?= $(GOPATH)/bin/gometalinter
GORELEASER ?= $(GOPATH)/bin/goreleaser
pkgs = $(shell $(GO) list ./... | grep -v /vendor/)
TARGET ?= s3deploy
PREFIX ?= $(shell pwd)
BIN_DIR ?= $(shell pwd)
test:
@echo ">> running tests"
@$(GO) test -race $(pkgs)
format:
@echo ">> formatting code"
@$(GO) fmt $(pkgs)
gometalinter: $(GOLINTER)
@echo ">> linting code"
@$(GOLINTER) --install --update > /dev/null
@$(GOLINTER) --config=./.gometalinter.json ./...
clean:
@echo ">> Cleaning up"
@find . -type f -name '*~' -exec rm -fv {} \;
@rm -fv $(TARGET)
build:
@echo ">> building binaries"
@$(GO) build
release:
@echo ">> building releases"
@$(GORELEASER) build