Skip to content

Commit

Permalink
ldflags, rm version/*
Browse files Browse the repository at this point in the history
  • Loading branch information
kotakanbe committed Oct 12, 2016
1 parent 9e7b1b6 commit 32a3d0b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 28 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ deps: setup
update: setup
glide update

bin: main.go deps
go build -ldflags "$(LDFLAGS)" -o $@ $<
build: main.go deps
go build -ldflags "$(LDFLAGS)" -o vuls $<

install: main.go deps
go install -ldflags "$(LDFLAGS)"

all: test

Expand Down
10 changes: 8 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(), "")
Expand All @@ -47,7 +52,8 @@ func main() {
flag.Parse()

if *v {
fmt.Printf("%s %s\n", version.Name, version.Version)
// fmt.Printf("%s %s %s\n", version.Name, version.Version, version.Revision)
fmt.Printf("vuls %s %s\n", version, revision)
os.Exit(int(subcommands.ExitSuccess))
}

Expand Down
24 changes: 0 additions & 24 deletions version/version.go

This file was deleted.

0 comments on commit 32a3d0b

Please sign in to comment.