Skip to content

Commit ec93723

Browse files
authored
Merge pull request #54 from informalsystems/52-add-a-makefile-and-version-info
Adds a Makefile and version command
2 parents 74d008e + 891dfec commit ec93723

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
install:
2+
go install ./cometmock

cometmock/main.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import (
1818
"github.com/urfave/cli/v2"
1919
)
2020

21+
const version = "v0.37.x"
22+
2123
// GetMockPVsFromNodeHomes returns a list of MockPVs, created with the priv_validator_key's from the specified node homes
2224
// We use MockPV because they do not do sanity checks that would e.g. prevent double signing
2325
func GetMockPVsFromNodeHomes(nodeHomes []string) []types.PrivValidator {
@@ -43,6 +45,16 @@ func main() {
4345
app := &cli.App{
4446
Name: "cometmock",
4547
HideHelpCommand: true,
48+
Commands: []*cli.Command{
49+
{
50+
Name: "version",
51+
Usage: "Print the version of cometmock",
52+
Action: func(c *cli.Context) error {
53+
fmt.Printf("%s\n", version)
54+
return nil
55+
},
56+
},
57+
},
4658
Flags: []cli.Flag{
4759
&cli.Int64Flag{
4860
Name: "block-time",

0 commit comments

Comments
 (0)