mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-24 07:14:15 +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)
|
FOLDER=$(GOOS).$(GOARCH)
|
||||||
|
COMMIT_HASH=$(shell git rev-parse HEAD)
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
@ -10,7 +11,7 @@ install:
|
|||||||
go install mizu.go
|
go install mizu.go
|
||||||
|
|
||||||
build: ## build mizu CLI binary (select platform via GOOS / GOARCH env variables)
|
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
|
build-all: ## build for all supported platforms
|
||||||
@echo "Compiling for every OS and Platform"
|
@echo "Compiling for every OS and Platform"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package mizu
|
package mizu
|
||||||
|
|
||||||
|
var Version = "development" // this var is overridden using ldflags in makefile when building
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Version = "0.1.0"
|
|
||||||
MizuResourcesNamespace = "default"
|
MizuResourcesNamespace = "default"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user