Skip to content

Commit

Permalink
Inject the version
Browse files Browse the repository at this point in the history
  • Loading branch information
0x416e746f6e committed Nov 16, 2023
1 parent 5e5f56e commit 976ea3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ env:

builds:
- main: ./cmd
ldflags:
- -X main.version={{.Version}}
targets:
- darwin_amd64
- darwin_arm64
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
VERSION := $(shell git describe --tags --always --dirty="-dev")

default: build

.PHONY: build
build:
CGO_ENABLED=0 go build -o ./bin/node-healthchecker github.com/flashbots/node-healthchecker/cmd
CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION}" -o ./bin/node-healthchecker github.com/flashbots/node-healthchecker/cmd

.PHONY: snapshot
snapshot:
Expand Down

0 comments on commit 976ea3a

Please sign in to comment.