Update magefile
This commit is contained in:
parent
cbeed36768
commit
158b0d684e
21
magefile.go
21
magefile.go
|
@ -7,20 +7,20 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/magefile/mage/mg"
|
||||
"github.com/magefile/mage/sh"
|
||||
|
||||
devtools "github.com/elastic/beats/v7/dev-tools/mage"
|
||||
"github.com/elastic/beats/v7/dev-tools/mage/target/build"
|
||||
"github.com/elastic/beats/v7/dev-tools/mage/target/common"
|
||||
"github.com/elastic/beats/v7/dev-tools/mage/target/pkg"
|
||||
"github.com/elastic/beats/v7/dev-tools/mage/target/unittest"
|
||||
"github.com/elastic/beats/v7/dev-tools/mage/target/update"
|
||||
)
|
||||
|
||||
func init() {
|
||||
devtools.SetBuildVariableSources(devtools.DefaultBeatBuildVariableSources)
|
||||
|
||||
devtools.BeatDescription = "Icingabeat fetches data from the Icinga 2 API and forwards it to Elasticsearch or Logstash."
|
||||
devtools.BeatVendor = "{full_name}"
|
||||
devtools.BeatVendor = "Icinga GmbH"
|
||||
devtools.BeatProjectType = devtools.CommunityProject
|
||||
devtools.CrossBuildMountModcache = true
|
||||
}
|
||||
|
@ -34,21 +34,28 @@ func Package() {
|
|||
|
||||
devtools.UseCommunityBeatPackaging()
|
||||
|
||||
mg.Deps(update.Update)
|
||||
mg.Deps(Update)
|
||||
mg.Deps(build.CrossBuild, build.CrossBuildGoDaemon)
|
||||
mg.SerialDeps(devtools.Package, pkg.PackageTest)
|
||||
}
|
||||
|
||||
// Config generates both the short/reference/docker configs.
|
||||
func Config() error {
|
||||
return devtools.Config(devtools.AllConfigTypes, devtools.ConfigFileParams{}, ".")
|
||||
// Update updates the generated files (aka make update).
|
||||
func Update() error {
|
||||
return sh.Run("make", "update")
|
||||
}
|
||||
|
||||
//Fields generates a fields.yml for the Beat.
|
||||
// Fields generates a fields.yml for the Beat.
|
||||
func Fields() error {
|
||||
return devtools.GenerateFieldsYAML()
|
||||
}
|
||||
|
||||
// Config generates both the short/reference/docker configs.
|
||||
func Config() error {
|
||||
p := devtools.DefaultConfigFileParams()
|
||||
p.Templates = append(p.Templates, "_meta/config/*.tmpl")
|
||||
return devtools.Config(devtools.AllConfigTypes, p, ".")
|
||||
}
|
||||
|
||||
// Clean cleans all generated files and build artifacts.
|
||||
func Clean() error {
|
||||
return devtools.Clean()
|
||||
|
|
Loading…
Reference in New Issue