Add chronoctl to Makefile
All usage information when no commands suppliedpull/2791/head
parent
9a44a73086
commit
323c7df5c3
2
Makefile
2
Makefile
|
@ -11,6 +11,7 @@ UISOURCES := $(shell find ui -type f -not \( -path ui/build/\* -o -path ui/node_
|
|||
unexport LDFLAGS
|
||||
LDFLAGS=-ldflags "-s -X main.version=${VERSION} -X main.commit=${COMMIT}"
|
||||
BINARY=chronograf
|
||||
CTLBINARY=chronoctl
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
|
@ -22,6 +23,7 @@ dev: dep dev-assets ${BINARY}
|
|||
|
||||
${BINARY}: $(SOURCES) .bindata .jsdep .godep
|
||||
go build -o ${BINARY} ${LDFLAGS} ./cmd/chronograf/main.go
|
||||
go build -o ${CTLBINARY} ${LDFLAGS} ./cmd/chronoctl
|
||||
|
||||
define CHRONOGIRAFFE
|
||||
._ o o
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/jessevdk/go-flags"
|
||||
|
@ -18,8 +19,9 @@ func main() {
|
|||
if flagsErr, ok := err.(*flags.Error); ok && flagsErr.Type == flags.ErrHelp {
|
||||
os.Exit(0)
|
||||
} else {
|
||||
fmt.Fprintln(os.Stdout)
|
||||
parser.WriteHelp(os.Stdout)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue