forked from youyo/postfix-log-parser
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
46 lines (37 loc) · 840 Bytes
/
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
46
.DEFAULT_GOAL := help
Owner := yo000
Name := postfix-log-parser
Repository := "github.com/$(Owner)/$(Name)"
GithubToken := ${GITHUB_TOKEN}
Version := $(shell git describe --tags --abbrev=0)
## Setup
setup:
GO111MODULE=off go get -v github.com/Songmu/goxz/cmd/goxz
GO111MODULE=off go get -v github.com/tcnksm/ghr
GO111MODULE=off go get -v github.com/jstemmer/go-junit-report
## Run tests
test:
go test -v -cover \
$(shell go list ./...)
## Execute `go run`
run:
go run \
$(Name)/main.go ${OPTION}
## Vendoring
vendoring:
go mod download
## Build
build:
go get
goxz -os=freebsd,darwin,linux -arch=amd64 -d=pkg ./$(Name)
## Release
release:
ghr -t ${GithubToken} -u $(Owner) -r $(Name) --replace $(Version) pkg/
## Remove packages
clean:
rm -rf pkg/
## Show help
help:
@make2help $(MAKEFILE_LIST)
.PHONY: help
.SILENT: