lib/omnibus/packagers/pkg.rb in omnibus-8.0.15 vs lib/omnibus/packagers/pkg.rb in omnibus-8.1.15
- old
+ new
@@ -123,11 +123,11 @@
# @!endgroup
# --------------------------------------------------
# @see Base#package_name
def package_name
- "#{safe_base_package_name}-#{safe_version}-#{safe_build_iteration}.pkg"
+ "#{safe_base_package_name}-#{safe_version}-#{safe_build_iteration}.#{safe_architecture}.pkg"
end
#
# The full path where the product package was/will be written.
#
@@ -284,10 +284,11 @@
variables: {
friendly_name: project.friendly_name,
identifier: safe_identifier,
version: safe_version,
component_pkg: component_pkg,
+ host_architecture: safe_architecture,
})
end
#
# Construct the product package. The generated package is the final build
@@ -316,9 +317,18 @@
#
# @return [String] the filename of the component .pkg file to create.
#
def component_pkg
"#{safe_base_package_name}-core.pkg"
+ end
+
+ #
+ # Return the architecture
+ #
+ # @return [String]
+ #
+ def safe_architecture
+ @safe_architecture ||= Ohai["kernel"]["machine"]
end
#
# Return the PKG-ready base package name, removing any invalid characters.
#