5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-15 16:39:32 +08:00

Add version command

This commit is contained in:
Lea Anthony 2023-08-13 15:13:01 +10:00
parent ee29faecbf
commit c03c41cb21
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
3 changed files with 18 additions and 0 deletions

View File

@ -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)

View File

@ -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
}

View File

@ -0,0 +1 @@
v3.0.0-alpha.0