Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Hepto
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ACIDES
Hepto
Commits
26d75ac5
Commit
26d75ac5
authored
1 year ago
by
kaiyou
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-version' into 'master'
Fix missing gitMajor and gitMinor See merge request
!9
parents
3189dd2b
76fd4e81
No related branches found
Branches containing commit
No related tags found
1 merge request
!9
Fix missing gitMajor and gitMinor
Pipeline
#30523
failed
1 year ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+5
-0
5 additions, 0 deletions
Makefile
env
+4
-0
4 additions, 0 deletions
env
with
9 additions
and
0 deletions
Makefile
0 → 100644
+
5
−
0
View file @
26d75ac5
default
:
build
build
:
export env
go build
-tags
"
${
TAGS
}
"
-ldflags
"
${
LDFLAGS
}
"
./cmd/hepto.go
This diff is collapsed.
Click to expand it.
env
+
4
−
0
View file @
26d75ac5
export VERSION=`git describe --tags --dirty --always | cut -d+ -f1`
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 TAGS="cgo,osusergo,netgo,seccomp,providerless,nolegacyproviders"
export LDFLAGS="-extldflags=-static"
export LDFLAGS="-extldflags=-static"
export LDFLAGS="$LDFLAGS -X k8s.io/component-base/version.gitVersion=$VERSION"
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.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/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.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"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment