From e3d90ff70d18a403212e852c3affff6adaab5fce Mon Sep 17 00:00:00 2001 From: Chris Hager Date: Thu, 24 Oct 2024 18:26:59 +0200 Subject: [PATCH] fix package name, version --- Makefile | 6 +++--- cmd/ecdsa-gen/main.go | 2 +- cmd/https-client/main.go | 2 +- cmd/https-server/main.go | 2 +- cmd/system-api/main.go | 15 +++++++++------ cmd/system-api/server.go | 2 +- cmd/tls-gen/main.go | 2 +- common/vars.go | 2 +- go.mod | 2 +- 9 files changed, 19 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 49461f5..9bce923 100644 --- a/Makefile +++ b/Makefile @@ -11,15 +11,15 @@ v: clean: rm -rf build/ -.PHONY: build-cli +.PHONY: build build: @mkdir -p ./build - go build -trimpath -ldflags "-X github.com/flashbots/builder-tools/common.Version=${VERSION}" -v -o ./build/system-api cmd/system-api/*.go + go build -trimpath -ldflags "-X github.com/flashbots/system-api/common.Version=${VERSION}" -v -o ./build/system-api cmd/system-api/*.go # .PHONY: build-httpserver # build-httpserver: # @mkdir -p ./build -# go build -trimpath -ldflags "-X github.com/flashbots/builder-tools/common.Version=${VERSION}" -v -o ./build/httpserver cmd/httpserver/main.go +# go build -trimpath -ldflags "-X github.com/flashbots/system-api/common.Version=${VERSION}" -v -o ./build/httpserver cmd/httpserver/main.go .PHONY: test test: diff --git a/cmd/ecdsa-gen/main.go b/cmd/ecdsa-gen/main.go index b9882ac..94f4999 100644 --- a/cmd/ecdsa-gen/main.go +++ b/cmd/ecdsa-gen/main.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" - "github.com/flashbots/builder-tools/common" + "github.com/flashbots/system-api/common" cli "github.com/urfave/cli/v2" // imports as package "cli" ) diff --git a/cmd/https-client/main.go b/cmd/https-client/main.go index 7ed469a..6e7c16d 100644 --- a/cmd/https-client/main.go +++ b/cmd/https-client/main.go @@ -9,7 +9,7 @@ import ( "net/http" "os" - "github.com/flashbots/builder-tools/common" + "github.com/flashbots/system-api/common" cli "github.com/urfave/cli/v2" ) diff --git a/cmd/https-server/main.go b/cmd/https-server/main.go index 3a3ddea..7bad610 100644 --- a/cmd/https-server/main.go +++ b/cmd/https-server/main.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/flashbots/builder-tools/common" + "github.com/flashbots/system-api/common" cli "github.com/urfave/cli/v2" // imports as package "cli" ) diff --git a/cmd/system-api/main.go b/cmd/system-api/main.go index 13e5fd2..6718a05 100644 --- a/cmd/system-api/main.go +++ b/cmd/system-api/main.go @@ -8,7 +8,7 @@ import ( "syscall" "time" - "github.com/flashbots/builder-tools/common" + "github.com/flashbots/system-api/common" cli "github.com/urfave/cli/v2" // imports as package "cli" ) @@ -27,10 +27,11 @@ var flags []cli.Flag = []cli.Flag{ func main() { app := &cli.App{ - Name: "system-api", - Usage: "HTTP API for status events", - Flags: flags, - Action: runCli, + Name: "system-api", + Usage: "HTTP API for status events", + Version: common.Version, + Flags: flags, + Action: runCli, } if err := app.Run(os.Args); err != nil { @@ -42,7 +43,9 @@ func runCli(cCtx *cli.Context) error { listenAddr := cCtx.String("listen-addr") pipeFile := cCtx.String("pipe-file") - log := common.SetupLogger(&common.LoggingOpts{}) + log := common.SetupLogger(&common.LoggingOpts{ + Version: common.Version, + }) // Setup and start the server (in the background) server, err := NewServer(&HTTPServerConfig{ diff --git a/cmd/system-api/server.go b/cmd/system-api/server.go index 59a58cd..537390e 100644 --- a/cmd/system-api/server.go +++ b/cmd/system-api/server.go @@ -13,7 +13,7 @@ import ( "syscall" "time" - "github.com/flashbots/builder-tools/common" + "github.com/flashbots/system-api/common" chi "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" ) diff --git a/cmd/tls-gen/main.go b/cmd/tls-gen/main.go index 7a475a8..923efd9 100644 --- a/cmd/tls-gen/main.go +++ b/cmd/tls-gen/main.go @@ -18,7 +18,7 @@ import ( "os" "time" - "github.com/flashbots/builder-tools/crypto" + "github.com/flashbots/system-api/crypto" ) var ( diff --git a/common/vars.go b/common/vars.go index 137a4bd..e4cbdb6 100644 --- a/common/vars.go +++ b/common/vars.go @@ -3,5 +3,5 @@ package common var Version = "dev" const ( - PackageName = "github.com/flashbots/builder-tools" + PackageName = "github.com/flashbots/system-api" ) diff --git a/go.mod b/go.mod index ce7f656..3b28419 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/flashbots/builder-tools +module github.com/flashbots/system-api go 1.22