photoprism/internal/commands/version.go

24 lines
382 B
Go
Raw Normal View History

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