Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Merge github.com:profclems/glab into bg-resolve-versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
profclems committed Aug 10, 2020
2 parents f789183 + 43e0a9d commit 395c9e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmd/glab/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

// Version is set at build
var version string

// build is set at build
var build string

Expand Down
7 changes: 4 additions & 3 deletions commands/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

// Version is the version for glab
var Version string

// Build holds the date bin was released
var Build string

Expand All @@ -20,13 +21,13 @@ var versionCmd = &cobra.Command{
Aliases: []string{"v"},
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("glab version %s (%s)\n", Version, Build)
if err := git.RunCmd([]string{"version"}); err != nil {
if err := git.RunCmd([]string{"version"}); err != nil {
fmt.Println(err)
}
fmt.Println("Made with ❤ by Clement Sam <clementsam75@gmail.com> and contributors")
},
}

func init() {
func init() {
RootCmd.AddCommand(versionCmd)
}
}

0 comments on commit 395c9e9

Please sign in to comment.