Use linker flags to set git commit in version command

This commit is contained in:
Ethan Frey
2017-08-18 22:04:50 +01:00
parent 27d86c7769
commit a908c24235
3 changed files with 11 additions and 5 deletions
+3 -2
View File
@@ -74,11 +74,12 @@ func main() {
srvCli.AddCommand(
commands.InitCmd,
commands.VersionCmd,
serveCmd,
)
// TODO: Decide whether to use $HOME/.basecli for compatibility
// or just use $HOME/.baseserver?
// this should share the dir with basecli, so you can use the cli and
// the api interchangeably
cmd := cli.PrepareMainCmd(srvCli, "BC", os.ExpandEnv("$HOME/.basecli"))
if err := cmd.Execute(); err != nil {
log.Fatal(err)