Commit 868bb664 authored by Jay Mundrawala's avatar Jay Mundrawala

Merge pull request #536 from chef/jdm/package-name-win-arch

Add architecture to package name on windows
parents 4bb5b596 6a909af7
......@@ -321,11 +321,11 @@ module Omnibus
end
def msi_name
"#{project.package_name}-#{project.build_version}-#{project.build_iteration}.msi"
"#{project.package_name}-#{project.build_version}-#{project.build_iteration}-#{Config.windows_arch}.msi"
end
def bundle_name
"#{project.package_name}-#{project.build_version}-#{project.build_iteration}.exe"
"#{project.package_name}-#{project.build_version}-#{project.build_iteration}-#{Config.windows_arch}.exe"
end
#
......
......@@ -90,13 +90,17 @@ module Omnibus
end
describe '#package_name' do
before do
allow(Config).to receive(:windows_arch).and_return(:foo_arch)
end
it 'includes the name, version, and build iteration' do
expect(subject.package_name).to eq('project-1.2.3-2.msi')
expect(subject.package_name).to eq('project-1.2.3-2-foo_arch.msi')
end
it 'returns the bundle name when building a bundle' do
subject.bundle_msi(true)
expect(subject.package_name).to eq('project-1.2.3-2.exe')
expect(subject.package_name).to eq('project-1.2.3-2-foo_arch.exe')
end
end
......@@ -181,6 +185,7 @@ module Omnibus
before do
subject.bundle_msi(true)
subject.upgrade_code('ABCD-1234')
allow(Config).to receive(:windows_arch).and_return(:x86)
end
it 'generates the file' do
......@@ -189,7 +194,7 @@ module Omnibus
end
it 'has the correct content' do
outpath = "#{tmp_path}/package/dir/project-1.2.3-2.msi"
outpath = "#{tmp_path}/package/dir/project-1.2.3-2-x86.msi"
outpath = outpath.gsub(File::SEPARATOR, File::ALT_SEPARATOR) if windows?
subject.write_bundle_file
contents = File.read("#{staging_dir}/bundle.wxs")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment