Skip to content

Commit

Permalink
test: try to install go-licence-detector with go mod tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonQ committed Sep 30, 2024
1 parent fcae5b8 commit b9f2de6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 3 additions & 1 deletion dev-tools/mage/gotool/noticer.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ var NoticeGenerator goNoticeGenerator = runGoNoticeGenerator

func runGoNoticeGenerator(opts ...ArgOpt) error {
args := buildArgs(opts).build()
return sh.RunV("go-licence-detector", args...)

return sh.RunV("go",
append([]string{"run", "go.elastic.co/go-licence-detector"}, args...)...)
}

func (goNoticeGenerator) Dependencies(path string) ArgOpt { return flagArg("-in", path) }
Expand Down
16 changes: 8 additions & 8 deletions dev-tools/mage/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ var (
// GoLicenserImportPath controls the import path used to install go-licenser.
GoLicenserImportPath = "github.com/elastic/go-licenser@latest"

// GoNoticeGeneratorImportPath controls the import path used to install go-licence-detector.
GoNoticeGeneratorImportPath = "go.elastic.co/go-licence-detector@latest"
// // GoNoticeGeneratorImportPath controls the import path used to install go-licence-detector.
// GoNoticeGeneratorImportPath = "go.elastic.co/go-licence-detector@latest"
)

// InstallGoLicenser target installs go-licenser
Expand All @@ -34,9 +34,9 @@ func InstallGoLicenser() error {
)
}

// InstallGoNoticeGen target installs go-licenser
func InstallGoNoticeGen() error {
return gotool.Install(
gotool.Install.Package(GoNoticeGeneratorImportPath),
)
}
// // InstallGoNoticeGen target installs go-licenser
// func InstallGoNoticeGen() error {
// return gotool.Install(
// gotool.Install.Package(GoNoticeGeneratorImportPath),
// )
// }
2 changes: 1 addition & 1 deletion dev-tools/mage/notice.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

func GenerateNotice(overrides, rules, noticeTemplate string) error {
mg.Deps(InstallGoNoticeGen, Deps.CheckModuleTidy)
mg.Deps(Deps.CheckModuleTidy)

err := gotool.Mod.Download(gotool.Download.All())
if err != nil {
Expand Down

0 comments on commit b9f2de6

Please sign in to comment.