Skip to content

Commit

Permalink
macOS PE tarballs include arch now
Browse files Browse the repository at this point in the history
Assume PE tarballs for macOS include the architecture unless it's an older agent
version. This fixes an issue when beaker-pe tries to fetch the tarball from the
PE server.
  • Loading branch information
joshcooper committed Jul 25, 2022
1 parent 95b4d76 commit 0008b7f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/beaker/host/mac/pkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,15 @@ def pe_puppet_agent_promoted_package_info( puppet_collection = nil, opts = {} )

variant, version, arch, codename = self['platform'].to_array
release_file = "/repos/apple/#{version}/#{puppet_collection}/#{arch}/puppet-agent-*"
download_file = "puppet-agent-#{variant}-#{version}.tar.gz"

# macOS puppet-agent tarballs haven't always included arch
agent_version = opts[:puppet_agent_version]
download_file = if agent_version && (agent_version.to_f < 6.28 || agent_version.to_f < 7.18)
"puppet-agent-#{variant}-#{version}.tar.gz"
else
"puppet-agent-#{variant}-#{version}-#{arch}.tar.gz"
end

return '', release_file, download_file
end

Expand Down

0 comments on commit 0008b7f

Please sign in to comment.