photoprism/internal/commands/version.go
Michael Mayer 0c4aa86f85 CLI: Create thumbs and convert files in deterministic order #3194
This also adds support for specifying a path to the thumbs command.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-02-14 11:37:22 +01:00

26 lines
466 B
Go

package commands
import (
"fmt"
"github.com/urfave/cli"
"github.com/photoprism/photoprism/internal/config"
)
// VersionCommand configures the command name, flags, and action.
var VersionCommand = cli.Command{
Name: "version",
Usage: "Shows version information",
Action: versionAction,
}
// versionAction prints the current version
func versionAction(ctx *cli.Context) error {
conf := config.NewConfig(ctx)
fmt.Println(conf.Version())
return nil
}