Skip to content

Instantly share code, notes, and snippets.

@BenHall
Created December 29, 2009 14:33
Show Gist options
  • Save BenHall/265343 to your computer and use it in GitHub Desktop.
Save BenHall/265343 to your computer and use it in GitHub Desktop.
Albacore zip workaround
def find_files_in(directories, include, exclude=nil)
files = []
directories.each do |d|
found = Dir.glob("#{d}/bin/#{@build_type}/#{include}");
found = found - Dir.glob("#{d}/bin/#{@build_type}/#{exclude}") unless exclude.nil?
files = files + found
end
return files
end
#Get all files apart from pdb
Albacore::ZipTask.new() do |zip|
zip.additional_files = find_files_in ['xunit', 'xunit.console', 'xunit.gui', 'xunit.runner.msbuild', 'xunit.runner.tdnet', 'xunit.runner.utility'], '*.*', '*.pdb'
zip.output_file = "xunit-build-#{get_build_number}.zip"
zip.output_path = File.dirname(__FILE__)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment