Skip to content

Commit

Permalink
Set the packageManager correctly from goreleaser
Browse files Browse the repository at this point in the history
Ensure that we are settings the package manager correctly.

I'll follow up with some tests for this in the BDD branch.
  • Loading branch information
marcomorain committed May 12, 2020
1 parent 39bbf29 commit b79c7e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ builds:
# -w Omit the DWARF symbol table.
# These are the defaults specified by goreleaser:
# https://github.com/goreleaser/goreleaser/blob/682c811106f56ffe06c4212de546aec62161fb9d/internal/builders/golang/build.go#L46
- -s -w -X github.com/CircleCI-Public/circleci-cli/version.Version={{.Version}} -X github.com/CircleCI-Public/circleci-cli/version.Commit={{.ShortCommit}} -X github.com/CircleCI-Public/circleci-cli/cmd.PackageManager=release
- -s -w -X github.com/CircleCI-Public/circleci-cli/version.Version={{.Version}} -X github.com/CircleCI-Public/circleci-cli/version.Commit={{.ShortCommit}} -X github.com/CircleCI-Public/circleci-cli/version.packageManager=release
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func PackageManager() string {

// UserAgent returns the user agent that should be user for external requests
func UserAgent() string {
return fmt.Sprintf("circleci-cli/%s+%s (%s)", Version, Commit, packageManager)
return fmt.Sprintf("circleci-cli/%s+%s (%s)", Version, Commit, PackageManager())
}

func runningInsideSnap() bool {
Expand Down

0 comments on commit b79c7e2

Please sign in to comment.