Skip to content

Commit

Permalink
Moving packaging related files to dev-tools/packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkroh authored and adriansr committed Jul 3, 2018
1 parent 2a58850 commit e80307a
Show file tree
Hide file tree
Showing 60 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions dev-tools/mage/dmgbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func newDMGBuilder(spec PackageSpec) (*dmgBuilder, error) {
return nil, err
}

preferencePaneDir := filepath.Join(beatsDir, "dev-tools/packer/platforms/darwin/preference-pane")
preferencePaneDir := filepath.Join(beatsDir, "dev-tools/packaging/preference-pane")
preferencePanePkgFile := filepath.Join(preferencePaneDir, "build/BeatsPrefPane.pkg")
beatIdentifier, ok := spec.evalContext["identifier"].(string)
if !ok {
Expand Down Expand Up @@ -152,10 +152,10 @@ func (b *dmgBuilder) buildProductPkg() error {
)

b.MustExpandFile(
filepath.Join(b.beatsDir, "dev-tools/mage/templates/darwin/distribution.plist.tmpl"),
filepath.Join(b.beatsDir, "dev-tools/packaging/templates/darwin/distribution.plist.tmpl"),
distributionPlist)
b.MustExpandFile(
filepath.Join(b.beatsDir, "dev-tools/mage/templates/darwin/README.html.tmpl"),
filepath.Join(b.beatsDir, "dev-tools/packaging/templates/darwin/README.html.tmpl"),
filepath.Join(resourcesDir, "README.html"))
for t, pf := range b.Files {
if strings.HasSuffix(t, "LICENSE.txt") {
Expand All @@ -164,7 +164,7 @@ func (b *dmgBuilder) buildProductPkg() error {
}
}
b.MustExpandFile(
filepath.Join(b.beatsDir, "dev-tools/mage/templates/darwin/README.html.tmpl"),
filepath.Join(b.beatsDir, "dev-tools/packaging/templates/darwin/README.html.tmpl"),
filepath.Join(resourcesDir, "README.html"))

if err := os.RemoveAll(b.dmgDir); err != nil {
Expand Down Expand Up @@ -204,7 +204,7 @@ func (b *dmgBuilder) buildUninstallApp() error {
infoPlist = "Uninstall.app/Contents/Info.plist"
)

inputDir := filepath.Join(b.beatsDir, "dev-tools/mage/templates/darwin/dmg")
inputDir := filepath.Join(b.beatsDir, "dev-tools/packaging/templates/darwin/dmg")

Copy(
filepath.Join(inputDir, uninstallerIcons),
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/mage/pkgspecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"gopkg.in/yaml.v2"
)

const packageSpecFile = "dev-tools/mage/files/packages.yml"
const packageSpecFile = "dev-tools/packaging/packages.yml"

// Packages defines the set of packages to be built when the package target is
// executed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var (
)

var (
files = flag.String("files", "../build/upload/*/*", "filepath glob containing package files")
files = flag.String("files", "../build/distributions/*/*", "filepath glob containing package files")
)

func TestRPM(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ shared:
# Deb/RPM spec for community beats.
- &deb_rpm_spec
<<: *common
post_install_script: '{{ elastic_beats_dir }}/dev-tools/mage/files/linux/systemd-daemon-reload.sh'
post_install_script: '{{ elastic_beats_dir }}/dev-tools/packaging/files/linux/systemd-daemon-reload.sh'
files:
/usr/share/{{.BeatName}}/bin/{{.BeatName}}{{.BinaryExt}}:
source: build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}}
Expand All @@ -34,7 +34,7 @@ shared:
source: '{{ repo.RootDir }}/NOTICE.txt'
mode: 0644
/usr/share/{{.BeatName}}/README.md:
template: '{{ elastic_beats_dir }}/dev-tools/mage/templates/common/README.md.tmpl'
template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/common/README.md.tmpl'
mode: 0644
/usr/share/{{.BeatName}}/.build_hash.txt:
content: >
Expand All @@ -54,13 +54,13 @@ shared:
source: build/golang-crossbuild/god-{{.GOOS}}-{{.Platform.Arch}}
mode: 0755
/usr/bin/{{.BeatName}}:
template: '{{ elastic_beats_dir }}/dev-tools/mage/templates/linux/beatname.sh.tmpl'
template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/linux/beatname.sh.tmpl'
mode: 0755
/lib/systemd/system/{{.BeatServiceName}}.service:
template: '{{ elastic_beats_dir }}/dev-tools/mage/templates/linux/systemd.unit.tmpl'
template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/linux/systemd.unit.tmpl'
mode: 0755
/etc/init.d/{{.BeatServiceName}}:
template: '{{ elastic_beats_dir }}/dev-tools/mage/templates/{{.PackageType}}/init.sh.tmpl'
template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/{{.PackageType}}/init.sh.tmpl'
mode: 0755

# MacOS pkg spec for community beats.
Expand All @@ -72,8 +72,8 @@ shared:
min_supported_osx_version: 10.8
identifier: 'co.{{.BeatVendor | tolower}}.beats.{{.BeatName}}'
install_path: /Library/Application Support
pre_install_script: '{{ elastic_beats_dir }}/dev-tools/mage/templates/darwin/scripts/preinstall.tmpl'
post_install_script: '{{ elastic_beats_dir }}/dev-tools/mage/templates/darwin/scripts/postinstall.tmpl'
pre_install_script: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/darwin/scripts/preinstall.tmpl'
post_install_script: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/darwin/scripts/postinstall.tmpl'
files:
/Library/Application Support/{{.BeatVendor}}/{{.BeatName}}/bin/{{.BeatName}}{{.BinaryExt}}:
source: build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}}
Expand All @@ -85,14 +85,14 @@ shared:
source: '{{ repo.RootDir }}/NOTICE.txt'
mode: 0644
/Library/Application Support/{{.BeatVendor}}/{{.BeatName}}/README.md:
template: '{{ elastic_beats_dir }}/dev-tools/mage/templates/common/README.md.tmpl'
template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/common/README.md.tmpl'
mode: 0644
/Library/Application Support/{{.BeatVendor}}/{{.BeatName}}/.build_hash.txt:
content: >
{{ commit }}
mode: 0644
/Library/Application Support/{{.BeatVendor}}/{{.BeatName}}/{{.identifier}}.plist:
template: '{{ elastic_beats_dir }}/dev-tools/mage/templates/darwin/launchd-daemon.plist.tmpl'
template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/darwin/launchd-daemon.plist.tmpl'
mode: 0644
/Library/Application Support/{{.BeatVendor}}/{{.BeatName}}/kibana:
source: _meta/kibana.generated
Expand Down Expand Up @@ -122,7 +122,7 @@ shared:
source: '{{ repo.RootDir }}/NOTICE.txt'
mode: 0644
README.md:
template: '{{ elastic_beats_dir }}/dev-tools/mage/templates/common/README.md.tmpl'
template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/common/README.md.tmpl'
mode: 0644
.build_hash.txt:
content: >
Expand Down Expand Up @@ -151,10 +151,10 @@ shared:
files:
<<: *binary_files
install-service-{{.BeatName}}.ps1:
template: '{{ elastic_beats_dir }}/dev-tools/mage/templates/windows/install-service.ps1.tmpl'
template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/windows/install-service.ps1.tmpl'
mode: 0755
uninstall-service-{{.BeatName}}.ps1:
template: '{{ elastic_beats_dir }}/dev-tools/mage/templates/windows/uninstall-service.ps1.tmpl'
template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/windows/uninstall-service.ps1.tmpl'
mode: 0755

#
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit e80307a

Please sign in to comment.