-
Notifications
You must be signed in to change notification settings - Fork 255
Log binary versions #216
Log binary versions #216
Changes from 6 commits
4293a22
a9d98c4
0aa0dfc
72efd1a
272a495
c2c0c6e
2f00eaa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,14 @@ var BuildDate string | |
// GitCommit is the commit hash when the binary was built | ||
var GitCommit string | ||
|
||
// Version is the version of the binary | ||
var Version string | ||
// MICVersion is the version of the MIC component | ||
var MICVersion string | ||
|
||
// NMIVersion is the version of the NMI component | ||
var NMIVersion string | ||
|
||
// PrintVersionAndExit prints the version and exits | ||
func PrintVersionAndExit() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this be used in case of -v command line option for both mmi and mic. Would be a good way to find out the comparable nmi/mic. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we really want to exit the process after printing the version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking if so if some one runs nmi -v this is the only which needs to be called. In that case the exit can be left there as is - thoughts ? Also wondering why the fmt was used here originally, does this assume that blog is not initialized or some other rule to be followed in version.go - any ideas ? |
||
fmt.Printf("Version: %s - Commit: %s - Date: %s\n", Version, GitCommit, BuildDate) | ||
fmt.Printf("MIC Version: %s - NMI Version: %s - Commit: %s - Date: %s\n", MICVersion, NMIVersion, GitCommit, BuildDate) | ||
os.Exit(0) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this what you meant @kkmsft ?