feat: implement version command#419
Merged
shizhMSFT merged 2 commits intonotaryproject:mainfrom Oct 31, 2022
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #419 +/- ##
==========================================
- Coverage 34.60% 34.09% -0.52%
==========================================
Files 23 24 +1
Lines 1254 1273 +19
==========================================
Hits 434 434
- Misses 809 828 +19
Partials 11 11
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
chloeyin
reviewed
Oct 26, 2022
chloeyin
reviewed
Oct 26, 2022
133861c to
74edd19
Compare
Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
74edd19 to
ba52b41
Compare
shizhMSFT
requested changes
Oct 27, 2022
Contributor
shizhMSFT
left a comment
There was a problem hiding this comment.
According to the spec, we should always print out all three of Version, Go Version, and Git Commit.
If the commit is not tagged, we should use unreleased as the build metadata.
if BUILD_METADATA is not defined in ENVIRONMENT variable, use `unreleased` as the value Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
Contributor
Author
|
rgnote
approved these changes
Oct 28, 2022
7h3-3mp7y-m4n
pushed a commit
to 7h3-3mp7y-m4n/notation
that referenced
this pull request
Mar 29, 2025
- Added version command - Removed --version flag - Update Makefile to set GitCommit value by ldflags - Update the BuildMetadata definition and allow user to override the value by environment variable Please build it by`make build` command to include git commit information Example ``` $ ./bin/notation version Notation: Notary v2, A tool to sign, store, and verify artifacts. Version: v0.11.0-alpha.4 Go version: go1.19 Git commit: f747031 ``` If it does `not` build by `make build` command, the output will be ``` $ ./bin/notation version Notation: Notary v2, A tool to sign, store, and verify artifacts. Version: v0.11.0-alpha.4 Go version: go1.19 ``` Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
FeynmanZhou
pushed a commit
to FeynmanZhou/notation
that referenced
this pull request
May 15, 2025
- Added version command - Removed --version flag - Update Makefile to set GitCommit value by ldflags - Update the BuildMetadata definition and allow user to override the value by environment variable Please build it by`make build` command to include git commit information Example ``` $ ./bin/notation version Notation: Notary v2, A tool to sign, store, and verify artifacts. Version: v0.11.0-alpha.4 Go version: go1.19 Git commit: f747031 ``` If it does `not` build by `make build` command, the output will be ``` $ ./bin/notation version Notation: Notary v2, A tool to sign, store, and verify artifacts. Version: v0.11.0-alpha.4 Go version: go1.19 ``` Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please build it by
make buildcommand to include git commit informationExample
If it does
notbuild bymake buildcommand, the output will beSigned-off-by: Junjie Gao junjiegao@microsoft.com