-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (29 loc) · 1.05 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
MAIN_PACKAGE_PATH := ./cmd/monitor
BINARY_NAME := polygon_monitor
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
help:
@echo 'Usage:'
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
# ==================================================================================== #
# QUALITY CONTROL
# ==================================================================================== #
## tidy: format code and tidy modfile
.PHONY: tidy
tidy:
go fmt ./...
go mod tidy -v
# ==================================================================================== #
# DEVELOPMENT
# ==================================================================================== #
## build: build the application
.PHONY: build
build:
go build -o=./build/bin/${BINARY_NAME} ${MAIN_PACKAGE_PATH}
## run: run the application
.PHONY: run
run: build
./build/bin/${BINARY_NAME}