Commit 22c20e4e authored by Eric Chiang's avatar Eric Chiang

cmd: add version subcommand to dexctl

closes #220
parent 8e5115ce
...@@ -11,7 +11,7 @@ mkdir -p $GOPATH/src/github.com/coreos/ ...@@ -11,7 +11,7 @@ mkdir -p $GOPATH/src/github.com/coreos/
LD_FLAGS="-X main.version=$(./git-version)" LD_FLAGS="-X main.version=$(./git-version)"
go build -o bin/dex-worker -ldflags="$LD_FLAGS" github.com/coreos/dex/cmd/dex-worker go build -o bin/dex-worker -ldflags="$LD_FLAGS" github.com/coreos/dex/cmd/dex-worker
go build -o bin/dexctl github.com/coreos/dex/cmd/dexctl go build -o bin/dexctl -ldflags="$LD_FLAGS" github.com/coreos/dex/cmd/dexctl
go build -o bin/dex-overlord -ldflags="$LD_FLAGS" github.com/coreos/dex/cmd/dex-overlord go build -o bin/dex-overlord -ldflags="$LD_FLAGS" github.com/coreos/dex/cmd/dex-overlord
go build -o bin/example-app github.com/coreos/dex/examples/app go build -o bin/example-app github.com/coreos/dex/examples/app
go build -o bin/example-cli github.com/coreos/dex/examples/cli go build -o bin/example-cli github.com/coreos/dex/examples/cli
package main
import "github.com/spf13/cobra"
var (
// set by the top level build script
version = ""
cmdVersion = &cobra.Command{
Use: "version",
Short: "Print the dexctl version.",
Long: "Print the dexctl version.",
Run: func(cmd *cobra.Command, args []string) {
stdout(version)
},
}
)
func init() {
rootCmd.AddCommand(cmdVersion)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment