mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-22 22:39:40 +00:00
Provide cli version as git hash from makefile
This commit is contained in:
parent
ff937e8160
commit
cc60ad064c
@ -1,4 +1,5 @@
|
||||
FOLDER=$(GOOS).$(GOARCH)
|
||||
COMMIT_HASH=$(shell git rev-parse HEAD)
|
||||
|
||||
.PHONY: help
|
||||
.DEFAULT_GOAL := help
|
||||
@ -10,7 +11,7 @@ install:
|
||||
go install mizu.go
|
||||
|
||||
build: ## build mizu CLI binary (select platform via GOOS / GOARCH env variables)
|
||||
go build -o bin/$(FOLDER)/mizu mizu.go
|
||||
go build -ldflags="-X 'github.com/up9inc/mizu/cli/mizu.Version=$(COMMIT_HASH)'" -o bin/$(FOLDER)/mizu mizu.go
|
||||
|
||||
build-all: ## build for all supported platforms
|
||||
@echo "Compiling for every OS and Platform"
|
||||
|
@ -1,6 +1,7 @@
|
||||
package mizu
|
||||
|
||||
var Version = "development" // this var is overridden using ldflags in makefile when building
|
||||
|
||||
const (
|
||||
Version = "0.1.0"
|
||||
MizuResourcesNamespace = "default"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user