Skip to content

Commit

Permalink
add version information
Browse files Browse the repository at this point in the history
  • Loading branch information
groob committed Jun 2, 2016
1 parent c5b549d commit 051bc1f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmd/scep/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,28 @@ import (
"golang.org/x/net/context"
)

// version info
var (
version = "unreleased"
gitHash = "unknown"
)

func main() {
// flags
var (
flVersion = flag.Bool("version", false, "prints version information")
flPort = flag.String("port", envString("SCEP_HTTP_LISTEN_PORT", "8080"), "port to listen on")
flDepotPath = flag.String("depot", envString("SCEP_FILE_DEPOT", "depot"), "path to ca folder")
flChallengePassword = flag.String("challenge", envString("SCEP_CHALLENGE_PASSWORD", ""), "enforce a challenge password")
)
flag.Parse()

// print version information
if *flVersion {
fmt.Printf("scep - %v\n", version)
fmt.Printf("git revision - %v\n", gitHash)
os.Exit(0)
}
port := ":" + *flPort
ctx := context.Background()

Expand Down

0 comments on commit 051bc1f

Please sign in to comment.