1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00
mxpv-podsync/Makefile

41 lines
575 B
Makefile
Raw Normal View History

2019-05-09 10:36:35 -07:00
BINPATH := $(abspath ./bin)
GOLANGCI := $(BINPATH)/golangci-lint
2019-02-24 14:19:55 -08:00
2019-11-13 19:12:33 -08:00
.PHONY: all
all: build lint test
#
# Build Podsync CLI binary
#
.PHONY: build
build:
go build -o podsync ./cmd/podsync
#
# Build Docker image
#
.PHONY: docker
docker:
docker build -t mxpv/podsync .
#
# Pull GolangCI-Lint dependency
#
2019-02-24 14:19:55 -08:00
$(GOLANGCI):
2019-07-25 16:57:53 -07:00
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(BINPATH) v1.17.1
2019-05-09 10:36:35 -07:00
$(GOLANGCI) --version
2019-02-24 14:19:55 -08:00
2019-11-13 19:12:33 -08:00
#
# Run linter
#
2019-02-24 14:19:55 -08:00
.PHONY: lint
lint: $(GOLANGCI)
2019-05-09 10:36:35 -07:00
$(GOLANGCI) run
2019-02-24 14:19:55 -08:00
2019-11-13 19:12:33 -08:00
#
# Run unit tests
#
2019-02-24 14:19:55 -08:00
.PHONY: test
test:
2019-10-26 22:55:19 -07:00
go test ./...