This repository has been archived by the owner on Oct 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide automatic buildinfo for plugins (#3261)
Fixes #3230 Signed-off-by: Marc Khouzam <kmarc@vmware.com>
- Loading branch information
1 parent
254f018
commit 833477e
Showing
3 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2021 VMware, Inc. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// Package buildinfo holds global variables set at build time to provide information about the plugin build. | ||
package buildinfo | ||
|
||
var ( | ||
// Date is the date the plugin binary was built. | ||
// It should be set using: | ||
// go build --ldflags "-X 'github.com/vmware-tanzu/tanzu-framework/cli/runtime/buildinfo.Date=...'" | ||
Date string | ||
|
||
// SHA is the git commit SHA the plugin binary was built with. | ||
// Is should be set using: | ||
// go build --ldflags "-X 'github.com/vmware-tanzu/tanzu-framework/cli/runtime/buildinfo.SHA=...'" | ||
SHA string | ||
|
||
// Version is the version of the plugin built. | ||
// It should be set using: | ||
// go build --ldflags "-X 'github.com/vmware-tanzu/tanzu-framework/cli/runtime/buildinfo.Version=...'" | ||
Version string | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters