This pull requests adds a basic cli interface using cobra (https://cobra.dev/) and implements injectable compilation information.
Use internal.version, internal.refHash, internal.compilationTimestampStr and internal.ephemeralBuildStr as variables where compilation information is injected. Their values can be accessed with internal.Version(), internal.RefHash, internal.EphemeralBuild() and internal.CompilationTimestamp(). These function counterparts return abstracted and improved values of the original injected ones.
Implement basic cli structure and functions
Add --version flag and version subcommand
Add info subcommand to display compilation information
This pull requests adds a basic cli interface using cobra (https://cobra.dev/) and implements injectable compilation information.
internal.version
,internal.refHash
,internal.compilationTimestampStr
andinternal.ephemeralBuildStr
as variables where compilation information is injected. Their values can be accessed withinternal.Version()
,internal.RefHash
,internal.EphemeralBuild()
andinternal.CompilationTimestamp()
. These function counterparts return abstracted and improved values of the original injected ones.--version
flag andversion
subcommandinfo
subcommand to display compilation informationMakefile
to inject compilation values