Skip to content

Commit

Permalink
Rename version variables
Browse files Browse the repository at this point in the history
  • Loading branch information
schnie committed Feb 14, 2018
1 parent 5f94044 commit 52d0e27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GIT_COMMIT_SHORT=$(shell git rev-parse --short HEAD)
VERSION ?= SNAPSHOT-${GIT_COMMIT_SHORT}

LDFLAGS_VERSION=-X github.com/astronomerio/astro-cli/cmd.version=${VERSION}
LDFLAGS_GIT_COMMIT=-X github.com/astronomerio/astro-cli/cmd.gitcommit=${GIT_COMMIT}
LDFLAGS_GIT_COMMIT=-X github.com/astronomerio/astro-cli/cmd.gitCommit=${GIT_COMMIT}

.DEFAULT_GOAL := build

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

var (
version = ""
gitcommit = ""
version string
gitCommit string
versionCmd = &cobra.Command{
Use: "version",
Short: "Astronomer CLI version",
Expand All @@ -23,6 +23,6 @@ func init() {

func printVersion(cmd *cobra.Command, args []string) error {
fmt.Printf("Astro CLI Version: %s\n", version)
fmt.Printf("Git Commit: %s\n", gitcommit)
fmt.Printf("Git Commit: %s\n", gitCommit)
return nil
}

0 comments on commit 52d0e27

Please sign in to comment.