Skip to content

Commit

Permalink
feat: add versioning (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
freak12techno authored Feb 19, 2023
1 parent 343fc7f commit ed167f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
LDFLAGS = -X main.version=${VERSION}

build:
go build cmd/cosmos-proposals-checker.go
go build -ldflags '$(LDFLAGS)' cmd/cosmos-proposals-checker.go

install:
go install cmd/cosmos-proposals-checker.go
go install -ldflags '$(LDFLAGS)' cmd/cosmos-proposals-checker.go

lint:
golangci-lint run --fix ./...
Expand Down
9 changes: 7 additions & 2 deletions cmd/cosmos-proposals-checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ func Execute(configPath string) {
app.Start()
}

var (
version = "unknown"
)

func main() {
var ConfigPath string

rootCmd := &cobra.Command{
Use: "cosmos-proposals-checker",
Long: "Checks the specific wallets on different chains for proposal votes.",
Use: "cosmos-proposals-checker",
Long: "Checks the specific wallets on different chains for proposal votes.",
Version: version,
Run: func(cmd *cobra.Command, args []string) {
Execute(ConfigPath)
},
Expand Down

0 comments on commit ed167f3

Please sign in to comment.