Skip to content
Snippets Groups Projects
Unverified Commit 76fd4e81 authored by Halfa's avatar Halfa
Browse files

Fix missing gitMajor and gitMinor

parent 3189dd2b
No related branches found
No related tags found
1 merge request!9Fix missing gitMajor and gitMinor
Pipeline #30519 failed
default: build
build:
export env
go build -tags "${TAGS}" -ldflags "${LDFLAGS}" ./cmd/hepto.go
export VERSION=`git describe --tags --dirty --always | cut -d+ -f1`
export VERSION_MAJOR=`echo $VERSION | cut -c2- | cut -d. -f1`
export VERSION_MINOR=`echo $VERSION | cut -c2- | cut -d. -f2`
export TAGS="cgo,osusergo,netgo,seccomp,providerless,nolegacyproviders"
export LDFLAGS="-extldflags=-static"
export LDFLAGS="$LDFLAGS -X k8s.io/component-base/version.gitVersion=$VERSION"
export LDFLAGS="$LDFLAGS -X k8s.io/component-base/version.gitCommit=`git describe --always`"
export LDFLAGS="$LDFLAGS -X k8s.io/component-base.version.buildDate=`date -u '+%Y-%m-%dT%H:%M:%SZ'`"
export LDFLAGS="$LDFLAGS -X k8s.io/client-go/pkg/version.gitVersion=$VERSION"
export LDFLAGS="$LDFLAGS -X k8s.io/client-go/pkg/version.gitMajor=$VERSION_MAJOR"
export LDFLAGS="$LDFLAGS -X k8s.io/client-go/pkg/version.gitMinor=$VERSION_MINOR"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment