Skip to content

Commit

Permalink
Use goreleaser to set version number on build
Browse files Browse the repository at this point in the history
  • Loading branch information
tangrufus committed Dec 13, 2020
1 parent 3dcc506 commit 44b545b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .goreleaser.yml
Expand Up @@ -7,6 +7,7 @@ builds:
- CGO_ENABLED=0
ldflags:
- -X main.updaterRepo=roots/trellis-cli
- -X main.version={{ .Version }}
goos:
- linux
- darwin
Expand Down
4 changes: 2 additions & 2 deletions main.go
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/mitchellh/cli"
)

const version = "0.9.2"

// To be replaced by goreleaser build flags.
var version = "canary"
var updaterRepo = ""

func main() {
Expand Down

0 comments on commit 44b545b

Please sign in to comment.