Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set output to stdout when printing the version #76

Merged
merged 3 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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