Commit 2171f581 authored by Mark Tyneway's avatar Mark Tyneway

fix: op-exporter build

The build and the docker build was broken, this commit
fixes that
parent dfab86ff
......@@ -44,3 +44,4 @@ coverage.out
# Ignore bedrock go bindings local output files
op-bindings/bin
op-exporter
FROM golang:1.18.0-alpine3.15 as builder
# build from root of repo
COPY ./op-exporter /app
WORKDIR /app/
RUN apk --no-cache add make bash jq git
RUN make build
FROM alpine:3.15
......
......@@ -10,9 +10,9 @@ 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)
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)"
......@@ -22,4 +22,4 @@ all: build
# Build binary
build:
CGO_ENABLED=0 go build $(LDFLAGS)
\ No newline at end of file
CGO_ENABLED=0 go build $(LDFLAGS)
This diff is collapsed.
......@@ -10,8 +10,9 @@ import (
"sync"
"time"
"github.com/ethereum-optimism/op_exporter/k8sClient"
"github.com/ethereum-optimism/op_exporter/version"
"github.com/ethereum-optimism/optimism/op-exporter/k8sClient"
"github.com/ethereum-optimism/optimism/op-exporter/version"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
......@@ -76,7 +77,7 @@ func main() {
kingpin.Parse()
if *versionFlag {
fmt.Printf("(version=%s, gitcommit=%s)\n", version.Version, version.GitCommit)
fmt.Printf("(go=%s, user=%s, date=%s)\n", version.GoVersion, version.BuildUser, version.BuildDate)
fmt.Printf("(go=%s, date=%s)\n", version.GoVersion, version.BuildDate)
os.Exit(0)
}
log.Infoln("exporter config", *listenAddress, *rpcProvider, *networkLabel)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment