forked from dcrodman/archon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (23 loc) · 830 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
CONFIG_PATH=/usr/local/etc/archon
BIN_DIR ?= bin
ANALYZER_DST ?= analyzer
.DEFAULT_TARGET := all
.PHONY: build lint test
all: build lint test
build:
mkdir -p ${BIN_DIR}
go build -o ${BIN_DIR} ./cmd/*
lint:
golangci-lint run
test:
go test ./...
run: build
${BIN_DIR}/server -config ${CONFIG_PATH}
# Requires that protobuf be installed: https://twitchtv.github.io/twirp/docs/install.html
protos:
protoc --proto_path=. --go_out=paths=source_relative:. internal/core/proto/archon.proto
protoc --proto_path=. --go_out=paths=source_relative:. --twirp_out=paths=source_relative:. internal/shipgate/shipgate.proto
analyzer: build
${BIN_DIR}/analyzer -auto -folder ${ANALYZER_DST} capture && \
${BIN_DIR}/analyzer compact ${ANALYZER_DST}/*.session && \
${BIN_DIR}/analyzer -collapse aggregate ${ANALYZER_DST}/*.session