Skip to content

Commit

Permalink
Build fields.go from mage instead of makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansr committed Oct 16, 2018
1 parent af07dce commit 562ed8d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 6 additions & 0 deletions dev-tools/mage/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,17 @@ func GenerateFieldsGo(fieldsYML, out string) error {
return err
}

licenseType := BeatLicense
if licenseType == "ASL 2.0" {
licenseType = "ASL2"
}

assetCmd := sh.RunCmd("go", "run",
filepath.Join(beatsDir, assetCmdPath),
"-pkg", "include",
"-in", fieldsYML,
"-out", createDir(out),
"-license", licenseType,
BeatName,
)

Expand Down
5 changes: 0 additions & 5 deletions libbeat/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,6 @@ endif
ifneq ($(shell [[ $(BEAT_NAME) == libbeat || $(BEAT_NAME) == metricbeat ]] && echo true ),true)
mkdir -p include
go run ${ES_BEATS}/dev-tools/cmd/asset/asset.go -pkg include -in fields.yml -out include/fields.go $(BEAT_NAME)
ifeq ($(shell [[ -e ${ES_BEATS}/x-pack/$(BEAT_NAME)/fields.yml ]] && echo true ),true)
mkdir -p include
go run ${ES_BEATS}/dev-tools/cmd/asset/asset.go -pkg include -in ${ES_BEATS}/x-pack/$(BEAT_NAME)/fields.yml -out ${ES_BEATS}/x-pack/$(BEAT_NAME)/include/fields.go -name fields.yml -license Elastic $(BEAT_NAME)
endif

endif

ifneq ($(shell [[ $(BEAT_NAME) == libbeat ]] && echo true ),true)
Expand Down
Loading

0 comments on commit 562ed8d

Please sign in to comment.