photoprism/internal/commands/version.go
2018-12-21 04:40:45 +01:00

23 lines
386 B
Go

package commands
import (
"fmt"
"github.com/photoprism/photoprism/internal/context"
"github.com/urfave/cli"
)
// Prints current version
var VersionCommand = cli.Command{
Name: "version",
Usage: "Shows version information",
Action: versionAction,
}
func versionAction(ctx *cli.Context) error {
conf := context.NewConfig(ctx)
fmt.Println(conf.AppVersion())
return nil
}