forked from gobitfly/eth2-beaconchain-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (24 loc) · 1 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
GITCOMMIT=`git describe --always`
VERSION=$$(git describe 2>/dev/null || echo "0.0.0-${GITCOMMIT}")
GITDATE=`TZ=UTC git show -s --date=iso-strict-local --format=%cd HEAD`
BUILDDATE=`date -u +"%Y-%m-%dT%H:%M:%S%:z"`
PACKAGE=eth2-exporter
LDFLAGS="-X ${PACKAGE}/version.Version=${VERSION} -X ${PACKAGE}/version.BuildDate=${BUILDDATE} -X ${PACKAGE}/version.GitCommit=${GITCOMMIT} -X ${PACKAGE}/version.GitDate=${GITDATE}"
all: explorer chartshotter stats
lint:
golint ./...
test:
go test -tags=blst_enabled ./...
explorer:
rm -rf bin/
mkdir -p bin/
cp -r templates bin/
go run cmd/bundle/main.go
cp -r static/ bin/static
cp -r locales/ bin/
go get github.com/swaggo/swag/cmd/[email protected] && swag init -g handlers/api.go
go build --ldflags=${LDFLAGS} --tags=blst_enabled -o bin/explorer cmd/explorer/main.go
chartshotter:
go build --ldflags=${LDFLAGS} --tags=blst_enabled -o bin/chartshotter cmd/chartshotter/main.go
stats:
go build --ldflags=${LDFLAGS} --tags=blst_enabled -o bin/statistics cmd/statistics/main.go