Skip to content

Commit

Permalink
correct path for var
Browse files Browse the repository at this point in the history
  • Loading branch information
steezeburger committed Mar 29, 2024
1 parent cb7fa07 commit d165234
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-for-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
ldflags: >
-X "cmd.Version=${{ github.ref }}"
-X github.com/astria/astria-cli-go/cmd.version=${{ github.ref }}
project_path: "./"
binary_name: "astria-go"
10 changes: 5 additions & 5 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/spf13/cobra"
)

// Version is set at build time via ldflags in the build-for-release workflow
var Version string
// version is set at build time via ldflags in the build-for-release workflow
var version string

// versionCmd represents the version command
var versionCmd = &cobra.Command{
Expand All @@ -19,10 +19,10 @@ var versionCmd = &cobra.Command{
}

func printVersion() {
if Version == "" {
Version = "development"
if version == "" {
version = "development"
}
fmt.Println(Version)
fmt.Println(version)
}

func init() {
Expand Down

0 comments on commit d165234

Please sign in to comment.