Skip to content

Commit

Permalink
Add version (#11)
Browse files Browse the repository at this point in the history
* Add version data and command
  • Loading branch information
jasonblanchard authored Jun 23, 2020
1 parent c41e66a commit 74c4243
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ before:
builds:
- env:
- CGO_ENABLED=0
ldflags:
- -X github.com/instructure-bridge/truss-cli/cmd.Version={{.Version}}
archives:
- replacements:
darwin: Darwin
Expand Down
8 changes: 6 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ import (

var cfgFile string

// Version is the program version, filled in from git during build process via ldflags
var Version = "development"

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "truss-cli",
Short: "A CLI for use with Bridge Truss",
Use: "truss-cli",
Short: "A CLI for use with Bridge Truss",
Version: Version,
// Long: `TODO`,
}

Expand Down

0 comments on commit 74c4243

Please sign in to comment.