-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
32 lines (24 loc) · 691 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
VERSION := $(shell git describe --tags 2>/dev/null)
GIT_HASH := $(shell git rev-parse --short HEAD)
GOOS :=
GOARCH :=
ENV := GOOS=${GOOS} GOARCH=${GOARCH}
LDFLAGS := \
-X main.version=${VERSION} \
-X main.gitHash=${GIT_HASH}
FLAGS := -ldflags='${LDFLAGS}'
.PHONY: build
build: modular-indexer-committee
modular-indexer-committee:
env ${ENV} go build ${FLAGS} -o $@
config.json: config.example.json
cp config.example.json config.json
.PHONY: ci
ci: config.json
go run github.com/RiemaLabs/nubit-ci/cmd/nubitci-lint@latest
.PHONY: ci-fix
ci-fix: config.json
go run github.com/RiemaLabs/nubit-ci/cmd/nubitci-lint@latest -w
.PHONY: clean
clean:
rm -rf ./modular-indexer-committee