1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-09 13:36:56 +02:00
goreleaser/Makefile
Carlos Alexandro Becker 6dc31b53bd
docs: fixes to use the "default" fork
I was using my own fork, but its getting
hard to maintain that. Lets use the
default version.
2017-12-04 09:49:29 -02:00

63 lines
1.5 KiB
Makefile

SOURCE_FILES?=./...
TEST_PATTERN?=.
TEST_OPTIONS?=
# Install all the build and lint dependencies
setup:
go get -u github.com/alecthomas/gometalinter
go get -u github.com/golang/dep/cmd/dep
go get -u github.com/pierrre/gotestcover
go get -u golang.org/x/tools/cmd/cover
go get -u github.com/apex/static/cmd/static-docs
dep ensure
gometalinter --install
# Run all the tests
test:
gotestcover $(TEST_OPTIONS) -covermode=atomic -coverprofile=coverage.txt $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=2m
# Run all the tests and opens the coverage report
cover: test
go tool cover -html=coverage.txt
# gofmt and goimports all go files
fmt:
find . -name '*.go' -not -wholename './vendor/*' | while read -r file; do gofmt -w -s "$$file"; goimports -w "$$file"; done
# Run all the linters
lint:
gometalinter --vendor ./...
# Run all the tests and code checks
ci: test lint
# Build a beta version of goreleaser
build:
go build
HIGHLIGHT=https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0
# Generate the static documentation
static:
rm -rf ../goreleaser.github.io/theme
@static-docs \
--in docs \
--out ../goreleaser.github.io \
--title GoReleaser \
--subtitle "Deliver Go binaries as fast and easily as possible" \
--google UA-106198408-1
# Show to-do items per file.
todo:
@grep \
--exclude-dir=vendor \
--exclude-dir=node_modules \
--exclude=Makefile \
--text \
--color \
-nRo -E ' TODO:.*|SkipNow|nolint:.*' .
.PHONY: todo
.DEFAULT_GOAL := build