mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 17:43:05 +00:00
Support outputting version with -v flag
This commit is contained in:
parent
58d163d2e0
commit
ed1b77ea3b
1 changed files with 5 additions and 1 deletions
6
app.go
6
app.go
|
@ -132,13 +132,17 @@ func Serve() {
|
|||
genKeys := flag.Bool("gen-keys", false, "Generate encryption and authentication keys")
|
||||
createSchema := flag.Bool("init-db", false, "Initialize app database")
|
||||
resetPassUser := flag.String("reset-pass", "", "Reset the given user's password")
|
||||
outputVersion := flag.Bool("v", false, "Output the current version")
|
||||
flag.Parse()
|
||||
|
||||
debugging = *debugPtr
|
||||
|
||||
app := &app{}
|
||||
|
||||
if *createConfig {
|
||||
if *outputVersion {
|
||||
fmt.Println(serverSoftware + " " + softwareVer)
|
||||
os.Exit(0)
|
||||
} else if *createConfig {
|
||||
log.Info("Creating configuration...")
|
||||
c := config.New()
|
||||
log.Info("Saving configuration...")
|
||||
|
|
Loading…
Reference in a new issue