Commit bda79a5a authored by Scott Hain's avatar Scott Hain

Moved to publisher, added test

parent 75ab72ba
......@@ -112,6 +112,10 @@ module Omnibus
publish_packages.concat(build_packages)
end
if publish_packages.empty?
log.info(log_key) { 'No packages found, skipping publish' }
end
publish_packages
end
end
......
......@@ -23,10 +23,6 @@ module Omnibus
log.info(log_key) { 'Starting artifactory publisher' }
safe_require('artifactory')
if packages.empty?
log.info(log_key) { 'No packages found, skipping publish' }
end
packages.each do |package|
# Make sure the package is good to go!
log.debug(log_key) { "Validating '#{package.name}'" }
......
......@@ -107,6 +107,20 @@ module Omnibus
end
end
end
context 'there are no packages to publish' do
before do
allow(FileSyncer).to receive(:glob)
.with(pattern)
.and_return([])
end
it 'prints a warning' do
output = capture_logging { subject.packages }
expect(output).to include('No packages found, skipping publish')
end
end
end
describe '#publish' do
......
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