diff --git a/v3/cmd/wails3/main.go b/v3/cmd/wails3/main.go index 170ddd33..5f620220 100644 --- a/v3/cmd/wails3/main.go +++ b/v3/cmd/wails3/main.go @@ -45,6 +45,8 @@ func main() { plugin.NewSubCommandFunction("init", "Initialise a new plugin", commands.PluginInit) //plugin.NewSubCommandFunction("add", "Add a plugin", commands.PluginAdd) + app.NewSubCommandFunction("version", "Print the version", commands.Version) + err := app.Run() if err != nil { pterm.Error.Println(err) diff --git a/v3/internal/commands/version.go b/v3/internal/commands/version.go new file mode 100644 index 00000000..0c6f5615 --- /dev/null +++ b/v3/internal/commands/version.go @@ -0,0 +1,15 @@ +package commands + +import ( + _ "embed" +) + +//go:embed version.txt +var VersionString string + +type VersionOptions struct{} + +func Version(_ *VersionOptions) error { + println(VersionString) + return nil +} diff --git a/v3/internal/commands/version.txt b/v3/internal/commands/version.txt new file mode 100644 index 00000000..906693d1 --- /dev/null +++ b/v3/internal/commands/version.txt @@ -0,0 +1 @@ +v3.0.0-alpha.0 \ No newline at end of file