does linting on docker build/ci now
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
19
Makefile
19
Makefile
@@ -22,14 +22,22 @@ ifneq ($(UNAME_S),Darwin)
|
||||
GOFLAGS = -ldflags "-linkmode external -extldflags -static $(GOLDFLAGS)"
|
||||
endif
|
||||
|
||||
default: fmt
|
||||
default: debug
|
||||
|
||||
commit: fmt lint
|
||||
git commit -a
|
||||
|
||||
fmt:
|
||||
go fmt ./...
|
||||
#go fmt ./...
|
||||
goimports -l -w .
|
||||
golangci-lint run --fix
|
||||
|
||||
lint:
|
||||
golangci-lint run
|
||||
sh -c 'test -z "$$(gofmt -l .)"'
|
||||
|
||||
debug: build
|
||||
GOTRACEBACK=all DEBUG=1 ./$(FN) 2>&1 | tee -a debug.log
|
||||
GOTRACEBACK=all HISTORYPOSTER_DEBUG=1 ./$(FN) 2>&1 | tee -a debug.log
|
||||
|
||||
run: build
|
||||
./$(FN)
|
||||
@@ -48,9 +56,4 @@ go-get:
|
||||
./$(FN): */*.go cmd/*/*.go go-get
|
||||
cd cmd/$(FN) && go build -o ../../$(FN) $(GOFLAGS) .
|
||||
|
||||
vet:
|
||||
go lint ./...
|
||||
go vet ./...
|
||||
bash -c 'test -z "$$(gofmt -l .)"'
|
||||
|
||||
.PHONY: build fmt test is_uncommitted docker dist hub upload-docker-image clean run rundebug default build-docker-image-dist
|
||||
|
||||
Reference in New Issue
Block a user