Improve makefile, -version shows git hash, fix README

This commit is contained in:
Kota Kanbe
2016-10-07 01:52:23 +09:00
parent b964d19d82
commit 95d6888c87
6 changed files with 79 additions and 134 deletions

View File

@@ -25,12 +25,17 @@ import (
"golang.org/x/net/context"
"github.com/future-architect/vuls/commands"
"github.com/future-architect/vuls/version"
"github.com/google/subcommands"
_ "github.com/mattn/go-sqlite3"
)
// Version of Vuls
var version = "0.1.6"
// Revision of Git
var revision string
func main() {
subcommands.Register(subcommands.HelpCommand(), "")
subcommands.Register(subcommands.FlagsCommand(), "")
@@ -47,7 +52,7 @@ func main() {
flag.Parse()
if *v {
fmt.Printf("%s %s\n", version.Name, version.Version)
fmt.Printf("vuls %s %s\n", version, revision)
os.Exit(int(subcommands.ExitSuccess))
}