mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Add version command
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
v3.0.0-alpha.0
|
||||
Reference in New Issue
Block a user