Skip to content

Commit

Permalink
Remove dmg from magefile build.
Browse files Browse the repository at this point in the history
  • Loading branch information
simitt authored and jalvz committed Aug 6, 2018
1 parent a02eb85 commit 27acff4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ func customizePackaging() {
Template: "package-README.md.tmpl",
}
)
for _, args := range mage.Packages {
for idx := len(mage.Packages) - 1; idx >= 0; idx-- {
args := mage.Packages[idx]
switch args.Types[0] {
case mage.Zip, mage.TarGz:
// Remove the reference config file from packages.
Expand All @@ -128,9 +129,7 @@ func customizePackaging() {
args.Spec.ReplaceFile("/usr/share/{{.BeatName}}/README.md", readmeTemplate)

case mage.DMG:
delete(args.Spec.Files, "/etc/{{.BeatName}}/{{.BeatName}}.reference.yml")
args.Spec.ReplaceFile("/Library/Application Support/{{.BeatVendor}}/{{.BeatName}}/README.md", readmeTemplate)

mage.Packages = append(mage.Packages[:idx], mage.Packages[idx+1:]...)
}
}
}

0 comments on commit 27acff4

Please sign in to comment.