File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ func main() {
5555 app.Name = " my-app"
5656 app.Author = " Gruntwork <www.gruntwork.io>"
5757
58- // Set the version number from your app from the VERSION variable that is passed in at build time in `version` package
58+ // Set the version number from your app from the Version variable that is passed in at build time in `version` package
5959 // for more understanding see github.com/gruntwork-io/go-commons/version
60- app.Version = version.Version ()
60+ app.Version = version.GetVersion ()
6161
6262 app.Action = func (cliContext *cli.Context ) error {
6363 // ( fill in your app details)
Original file line number Diff line number Diff line change @@ -3,16 +3,16 @@ package version
33// This variable is set at build time using -ldflags parameters. For example, we typically set this flag in circle.yml
44// to the latest Git tag when building our Go apps:
55//
6- // build-go-binaries --app-name my-app --dest-path bin --ld-flags "-X github.com/gruntwork-io/go-commons/version.VERSION =$CIRCLE_TAG"
7- // go build -o my-app -ldflags "-X github.com/gruntwork-io/go-commons/version.VERSION =v1.0.0"
6+ // build-go-binaries --app-name my-app --dest-path bin --ld-flags "-X github.com/gruntwork-io/go-commons/version.Version =$CIRCLE_TAG"
7+ // go build -o my-app -ldflags "-X github.com/gruntwork-io/go-commons/version.Version =v1.0.0"
88//
99// For more info, see: http://stackoverflow.com/a/11355611/483528
1010
1111var (
12- VERSION = "latest"
12+ Version = "latest"
1313)
1414
1515// Version composes a version of the package
16- func Version () string {
17- return VERSION
16+ func GetVersion () string {
17+ return Version
1818}
You can’t perform that action at this time.
0 commit comments