forked from mystiq/dex
parent
8e5115ce73
commit
22c20e4e32
2 changed files with 22 additions and 1 deletions
2
build
2
build
|
@ -11,7 +11,7 @@ mkdir -p $GOPATH/src/github.com/coreos/
|
|||
|
||||
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/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/example-app github.com/coreos/dex/examples/app
|
||||
go build -o bin/example-cli github.com/coreos/dex/examples/cli
|
||||
|
|
21
cmd/dexctl/command_version.go
Normal file
21
cmd/dexctl/command_version.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
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)
|
||||
}
|
Loading…
Reference in a new issue