-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
45 lines (35 loc) · 1.13 KB
/
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
36
37
38
39
40
41
42
43
44
45
# This file is generated with create-go-app: do not edit.
.PHONY: build clean test snapshot all install help
# special target to export all variables
.EXPORT_ALL_VARIABLES:
PROJECT_RELEASE := 1
DOCKER_IMAGE_PREFIX := local
CI_PROJECT_URL := http://localhost
INSTALL_DIR := $(HOME)/bin
GO_VERSION := $(shell (go version | awk '{print $$3;}'))
BINARIES := $(shell find ./dist ! -name '*goreleaserdocker*' -path '*_linux_*' -type f -executable)
## build: build the binaries only
build:
goreleaser build --clean --snapshot
## snapshot: create a snapshot release
snapshot:
goreleaser release --snapshot --clean --skip-sign
## clean: cleanup
clean:
rm -rf ./dist
all: build
## install: installs resulting binaries to $HOME/bin
install: build
mkdir -p $(INSTALL_DIR) && install $(BINARIES) $(INSTALL_DIR)
## test: run linter and tests
test:
go generate ./...
golangci-lint run
go test -v -count=1 ./...
## test-short: run test without linting and not in verbose mode
test-short:
go generate ./...
go test -count=1 ./...
help: Makefile
@echo " Choose a command run in "$(PROJECTNAME)":"
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'