Skip to content

Commit

Permalink
Build Heartbeat for Agent from the OSS directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano committed Aug 11, 2020
1 parent d036955 commit 7dc49ec
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions x-pack/elastic-agent/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,15 +523,24 @@ func packageAgent(requiredPackages []string, packagingFn func()) {
defer os.RemoveAll(dropPath)
defer os.Unsetenv(agentDropPath)

packedBeats := []string{"filebeat", "heartbeat", "metricbeat"}
packedBeats := []struct {
name string
relPath string
}{
{"filebeat", ".."},
{"metricbeat", ".."},

// Built from the OSS directory
{"heartbeat", "../.."},
}

for _, b := range packedBeats {
pwd, err := filepath.Abs(filepath.Join("..", b))
pwd, err := filepath.Abs(filepath.Join(b.relPath, b.name))
if err != nil {
panic(err)
}

if requiredPackagesPresent(pwd, b, version, requiredPackages) {
if requiredPackagesPresent(pwd, b.name, version, requiredPackages) {
continue
}

Expand Down

0 comments on commit 7dc49ec

Please sign in to comment.