diff --git a/dev-tools/mage/gotool/noticer.go b/dev-tools/mage/gotool/noticer.go index 26669c3f..9c493b3b 100644 --- a/dev-tools/mage/gotool/noticer.go +++ b/dev-tools/mage/gotool/noticer.go @@ -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) } diff --git a/dev-tools/mage/install.go b/dev-tools/mage/install.go index 776f90be..648550b8 100644 --- a/dev-tools/mage/install.go +++ b/dev-tools/mage/install.go @@ -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 @@ -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), - ) -} diff --git a/dev-tools/mage/notice.go b/dev-tools/mage/notice.go index 75f49e1c..6f3c04ad 100644 --- a/dev-tools/mage/notice.go +++ b/dev-tools/mage/notice.go @@ -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 {