cmd/lncli: add commit version hook and print in version
This commit is contained in:
parent
70038754ff
commit
b13970da70
@ -29,6 +29,10 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
//Commit stores the current commit hash of this build. This should be
|
||||||
|
//set using -ldflags during compilation.
|
||||||
|
Commit string
|
||||||
|
|
||||||
defaultLndDir = btcutil.AppDataDir("lnd", false)
|
defaultLndDir = btcutil.AppDataDir("lnd", false)
|
||||||
defaultTLSCertPath = filepath.Join(defaultLndDir, defaultTLSCertFilename)
|
defaultTLSCertPath = filepath.Join(defaultLndDir, defaultTLSCertFilename)
|
||||||
defaultMacaroonPath = filepath.Join(defaultLndDir, defaultMacaroonFilename)
|
defaultMacaroonPath = filepath.Join(defaultLndDir, defaultMacaroonFilename)
|
||||||
@ -150,7 +154,7 @@ func getClientConn(ctx *cli.Context, skipMacaroons bool) *grpc.ClientConn {
|
|||||||
func main() {
|
func main() {
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = "lncli"
|
app.Name = "lncli"
|
||||||
app.Version = "0.4"
|
app.Version = fmt.Sprintf("%s commit=%s", "0.4", Commit)
|
||||||
app.Usage = "control plane for your Lightning Network Daemon (lnd)"
|
app.Usage = "control plane for your Lightning Network Daemon (lnd)"
|
||||||
app.Flags = []cli.Flag{
|
app.Flags = []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
|
Loading…
Reference in New Issue
Block a user