default task for Makefile

Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
Casey Lee 2020-02-17 21:59:08 -08:00
parent 573f78e1b4
commit 3dd50dfe28
No known key found for this signature in database
GPG Key ID: 1899120ECD0A1784
1 changed files with 2 additions and 9 deletions

View File

@ -15,21 +15,14 @@ TAG_VERSION = v$(VERSION)
ACT ?= go run -mod=vendor main.go ACT ?= go run -mod=vendor main.go
export GITHUB_TOKEN = $(shell cat ~/.config/github/token) export GITHUB_TOKEN = $(shell cat ~/.config/github/token)
default: check
test:
go test -cover -short ./...
check: check:
$(ACT) -orj ci @golangci-lint run
@go test -cover ./...
build: check build: check
$(eval export SNAPSHOT_VERSION=$(VERSION)) $(eval export SNAPSHOT_VERSION=$(VERSION))
$(ACT) -ra build $(ACT) -ra build
release:
$(ACT) -ra local-release
install: build install: build
@cp dist/$(shell go env GOOS)_$(shell go env GOARCH)/act /usr/local/bin/act @cp dist/$(shell go env GOOS)_$(shell go env GOARCH)/act /usr/local/bin/act
@chmod 755 /usr/local/bin/act @chmod 755 /usr/local/bin/act