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

Tidy mage package output: only display links on failure, fix failing fleet config embed #6547

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
7 changes: 3 additions & 4 deletions dev-tools/cmd/buildfleetcfg/buildfleetcfg.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion dev-tools/mage/gotool/linkcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
package gotool

import (
"fmt"

"github.com/magefile/mage/sh"
)

Expand All @@ -15,7 +17,13 @@ var LinkCheck goLinkCheck = runGoLinkCheck

func runGoLinkCheck(opts ...ArgOpt) error {
args := buildArgs(opts).build()
return sh.RunV("link-patrol", args...)
output, err := sh.Output("link-patrol", args...)
if err != nil {
fmt.Println(output)
return err
}

return nil
}

func (goLinkCheck) Path(path string) ArgOpt { return flagArgIf("-f", path) }
2 changes: 1 addition & 1 deletion internal/pkg/agent/application/configuration_embed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ func BuildFleetCfg() error {
out := filepath.Join("internal", "pkg", "agent", "application", "configuration_embed.go")

fmt.Printf(">> BuildFleetCfg %s to %s\n", in, out)
return RunGo("run", goF, "--in", in, "--out", out)
return RunGo("run", goF, "--in", in, "--output", out)
}

// Enroll runs agent which enrolls before running.
Expand Down
Loading