neoneo-go/cli/main.go
Evgeniy Kulikov 902125cbeb
Change the way to receive version
- Used git to receive version from tags (see #304)
- Version now displayed when start node (fix #102)

Example:

→ ./bin/node --version
neo-go version 0.44.10-245-g67d5e9f

→ ./bin/node -v
neo-go version 0.44.10-245-g67d5e9f
2019-08-26 19:32:09 +03:00

30 lines
591 B
Go

package main
import (
"os"
"github.com/CityOfZion/neo-go/cli/server"
"github.com/CityOfZion/neo-go/cli/smartcontract"
"github.com/CityOfZion/neo-go/cli/vm"
"github.com/CityOfZion/neo-go/cli/wallet"
"github.com/CityOfZion/neo-go/config"
"github.com/urfave/cli"
)
func main() {
ctl := cli.NewApp()
ctl.Name = "neo-go"
ctl.Version = config.Version
ctl.Usage = "Official Go client for Neo"
ctl.Commands = []cli.Command{
server.NewCommand(),
smartcontract.NewCommand(),
wallet.NewCommand(),
vm.NewCommand(),
}
if err := ctl.Run(os.Args); err != nil {
panic(err)
}
}