forked from kabukky/journey
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (24 loc) · 759 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
all: journey
.PHONY: all fmt clean
PACKAGE = github.com/rkuris/journey
PKG_DIRS ?= authentication configuration conversion database date filenames flags \
helpers https notifications plugins server slug structure templates watcher
PKGS := $(foreach dir,$(PKG_DIRS), $(PACKAGE)/$(dir))
PKG_FILES := $(foreach dir,$(PKG_DIRS), $(wildcard $(dir)/*.go))
MAIN_FILES = main.go
VET_LOG = vet.log
vet: vendor
@$(foreach dir,$(PKG_DIRS),go vet $(VET_RULES) $(PACKAGE)/$(dir)|tee -a $(VET_LOG); )
@go vet $(VET_RULES) $(MAIN_FILES) | tee -a $(VET_LOG)
@[ ! -s $(VET_LOG) ]
@rm $(VET_LOG)
GOIMPORTS ?= go imports
GOFMT ?= go fmt
fmt:
@$(GOFMT) $(PKGS)
journey: $(PKG_FILES) vendor
go build
clean:
rm -f journey lint.log vet.log
vendor:
mkdir vendor