Skip to content

Commit

Permalink
use go.elastic.co/go-licence-detector defined on go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonQ committed Sep 30, 2024
1 parent db97c9d commit 162e7fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 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
10 changes: 0 additions & 10 deletions dev-tools/mage/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ import "github.com/elastic/elastic-agent-libs/dev-tools/mage/gotool"
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"
)

// InstallGoLicenser target installs go-licenser
Expand All @@ -33,10 +30,3 @@ func InstallGoLicenser() error {
gotool.Install.Package(GoLicenserImportPath),
)
}

// 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 162e7fc

Please sign in to comment.