Rake Tip: force tasks to run based on operating system
task :windows_only do
raise "Must be run from Windows, not #{RUBY_PLATFORM}" unless RUBY_PLATFORM =~ /mswin/
end
task :linux_only do
raise "Must be run from Linux, not #{RUBY_PLATFORM}" unless RUBY_PLATFORM =~ /linux/
end
• Text tagged as: rake