Skip to content

Commit

Permalink
feat: improve sesh version during local build (#141)
Browse files Browse the repository at this point in the history
sets the sesh -v flag version according to the latest git tag
  • Loading branch information
AgusDOLARD authored Aug 20, 2024
1 parent ae2d6c5 commit 7a152bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.PHONY: test build

BUILD_FLAGS="-X 'main.version=`git describe --tags --abbrev=0`'"

test:
go test -cover -bench=. -benchmem -race ./... -coverprofile=coverage.out

build:
go build -o $(shell echo $$GOPATH)/bin/sesh-dev
@go build -ldflags ${BUILD_FLAGS} -o $(shell echo $$GOPATH)/bin/sesh-dev

0 comments on commit 7a152bb

Please sign in to comment.