forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (21 loc) · 730 Bytes
/
Makefile
File metadata and controls
28 lines (21 loc) · 730 Bytes
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
SHELL := /bin/bash
ifndef VERSION
VERSION := `jq .version package.json `
endif
ifndef GITCOMMIT
GITCOMMIT := `git rev-parse HEAD`
endif
ifndef BUILDDATE
BUILDDATE := `date +%Y-%m-%d`
endif
LDFLAGSSTRING :=-X github.com/ethereum-optimism/op-exporter/version.Version=$(VERSION)
LDFLAGSSTRING +=-X github.com/ethereum-optimism/op-exporter/version.GitCommit=$(GITCOMMIT)
LDFLAGSSTRING +=-X github.com/ethereum-optimism/op-exporter/version.BuildDate=$(BUILDDATE)
LDFLAGS :=-ldflags "$(LDFLAGSSTRING)"
.PHONY: all build
all: build
# Build binary
build:
CGO_ENABLED=0 go build $(LDFLAGS)
lint:
golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint --timeout 5m -e "errors.As" -e "errors.Is" ./...