-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
56 lines (42 loc) · 1.18 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
46
47
48
49
50
51
52
53
54
55
.PHONY: all
all: lint test build
# ==============================================================================
# Build Options
ROOT_PACKAGE=github.com/choujimmy/gomakefile
VERSION_PACKAGE=$(ROOT_PACKAGE)/pkg/app/version
# ==============================================================================
# Includes
include build/lib/common.mk
include build/lib/golang.mk
include build/lib/image.mk
# ==============================================================================
# Targets
## build: Build source code for host platform.
.PHONY: build
build:
@$(MAKE) go.build
## build.all: Build source code for all platforms.
.PHONY: build.all
build.all:
@$(MAKE) go.build.all
## image: Build docker images and push to registry.
.PHONY: image
image:
@$(MAKE) image.push
## clean: Remove all files that are created by building.
.PHONY: clean
clean:
@$(MAKE) go.clean
## lint: Check syntax and styling of go sources.
.PHONY: lint
lint:
@$(MAKE) go.lint
## test: Run unit test.
.PHONY: test
test:
@$(MAKE) go.test
## help: Show this help info.
.PHONY: help
help: Makefile
@echo -e "\nUsage: make <OPTIONS> ... <TARGETS>\n\nTargets:"
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'