Add version numbers and ARM build

This commit is contained in:
Barak Michener 2014-07-24 16:30:45 -04:00
parent 2dbbd17fe1
commit d2b1d64de3
2 changed files with 12 additions and 1 deletions

View file

@ -1,5 +1,5 @@
{
"Arch": "amd64 386",
"Arch": "arm amd64 386",
"Os": "linux darwin windows",
"ResourcesInclude": "README.md,static,templates,LICENSE,AUTHORS,CONTRIBUTORS,docs,cayley.cfg.example,30kmoviedata.nq.gz,testdata.nq",
"ConfigVersion": "0.9"

View file

@ -40,6 +40,10 @@ var cpuprofile = flag.String("prof", "", "Output profiling file.")
var queryLanguage = flag.String("query_lang", "gremlin", "Use this parser as the query language.")
var configFile = flag.String("config", "", "Path to an explicit configuration file.")
// Filled in by `go build ldflags="-X main.VERSION `ver`"`.
var BUILD_DATE string
var VERSION string
func Usage() {
fmt.Println("Cayley is a graph store and graph query layer.")
fmt.Println("\nUsage:")
@ -52,6 +56,9 @@ func Usage() {
fmt.Println("\nFlags:")
flag.Parse()
flag.PrintDefaults()
if VERSION != "" {
fmt.Printf("Release v%s\n", VERSION)
}
}
func main() {
@ -68,6 +75,10 @@ func main() {
os.Args = newargs
flag.Parse()
if VERSION != "" {
glog.Info("Cayley v", VERSION, " built ", BUILD_DATE)
}
cfg := config.ParseConfigFromFlagsAndFile(*configFile)
if os.Getenv("GOMAXPROCS") == "" {