0c4aa86f85
This also adds support for specifying a path to the thumbs command. Signed-off-by: Michael Mayer <michael@photoprism.app>
25 lines
466 B
Go
25 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
|
|
}
|