photoprism/internal/commands/version.go

24 lines
381 B
Go
Raw Normal View History

2018-12-21 04:32:17 +01:00
package commands
import (
"fmt"
"github.com/photoprism/photoprism/internal/config"
2018-12-21 04:32:17 +01:00
"github.com/urfave/cli"
)
// Prints current version
2018-12-21 04:32:17 +01:00
var VersionCommand = cli.Command{
Name: "version",
Usage: "Shows version information",
2018-12-21 04:32:17 +01:00
Action: versionAction,
}
func versionAction(ctx *cli.Context) error {
conf := config.NewConfig(ctx)
2018-12-21 04:32:17 +01:00
fmt.Println(conf.Version())
2018-12-21 04:32:17 +01:00
return nil
}