Skip to content

Commit

Permalink
Merge pull request #76 from cpanato/output-to-stout
Browse files Browse the repository at this point in the history
set output to stdout when printing the version
  • Loading branch information
k8s-ci-robot authored Mar 27, 2023
2 parents 648ff1e + f23e557 commit 2b998c6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions mage/dependency.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func EnsureZeitgeist(version string) error {
if err := pkg.EnsurePackageWith(pkg.EnsurePackageOptions{
Name: zeitgeistModule,
DefaultVersion: version,
VersionCommand: "version",
}); err != nil {
return fmt.Errorf("ensuring package: %w", err)
}
Expand Down
7 changes: 0 additions & 7 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import (
"fmt"
"path/filepath"

"github.com/carolynvs/magex/pkg"

"sigs.k8s.io/release-utils/mage"
)

Expand Down Expand Up @@ -63,11 +61,6 @@ func Test() error {

// Verify runs repository verification scripts
func Verify() error {
fmt.Println("Ensuring mage is available...")
if err := pkg.EnsureMage(""); err != nil {
return err
}

fmt.Println("Running copyright header checks...")
if err := mage.VerifyBoilerplate("", binDir, boilerplateDir, true); err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions version/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func version(fontName string) *cobra.Command {
if fontName != "" && v.CheckFontName(fontName) {
v.FontName = fontName
}
cmd.SetOut(cmd.OutOrStdout())

if outputJSON {
out, err := v.JSONString()
Expand Down

0 comments on commit 2b998c6

Please sign in to comment.