diff --git a/.goxc.json b/.goxc.json index 2742cab..538f98c 100644 --- a/.goxc.json +++ b/.goxc.json @@ -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" diff --git a/cayley.go b/cayley.go index 87bf18b..49392c7 100644 --- a/cayley.go +++ b/cayley.go @@ -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") == "" {