Skip to content

Commit

Permalink
Show GitCommit hash
Browse files Browse the repository at this point in the history
  • Loading branch information
tcnksm committed Apr 14, 2015
1 parent b445685 commit 86500ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.test
bin
latest/pkg/
2 changes: 1 addition & 1 deletion latest/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (c *CLI) Run(args []string) int {

// Show version and quit
if *flgVersion {
fmt.Fprintf(c.errStream, "%s Version v%s\n", Name, Version)
fmt.Fprintf(c.errStream, "%s Version v%s build %s\n", Name, Version, GitCommit)
return 0
}

Expand Down
2 changes: 2 additions & 0 deletions latest/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ package main

const Name = "latest"
const Version = "0.1.1"

var GitCommit = ""

0 comments on commit 86500ab

Please sign in to comment.