-
-
Notifications
You must be signed in to change notification settings - Fork 101
/
Makefile
31 lines (24 loc) · 789 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
CLI_BIN := ./bin/doggo.bin
WEB_BIN := ./bin/doggo-web.bin
HASH := $(shell git rev-parse --short HEAD)
BUILD_DATE := $(shell date '+%Y-%m-%d %H:%M:%S')
VERSION := ${HASH}
.PHONY: build-cli
build-cli:
go build -o ${CLI_BIN} -ldflags="-X 'main.buildVersion=${VERSION}' -X 'main.buildDate=${BUILD_DATE}'" ./cmd/doggo/
.PHONY: build-web
build-web:
go build -o ${WEB_BIN} -ldflags="-X 'main.buildVersion=${VERSION}' -X 'main.buildDate=${BUILD_DATE}'" ./web/
.PHONY: run-cli
run-cli: build-cli ## Build and Execute the CLI binary after the build step.
${CLI_BIN}
.PHONY: run-web
run-web: build-web ## Build and Execute the API binary after the build step.
${WEB_BIN} --config config-api-sample.toml
.PHONY: clean
clean:
go clean
- rm -rf ./bin/
.PHONY: lint
lint:
golangci-lint run