require_relative './color.rb' require 'awesome_print' class Build < Array def initialize # Gem builds, `gem build dev_tasks.spec` Dir.glob('*.gemspec') {|f| self.add "gem build #{f}" } # .sln builds, `"C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe" "MySolution.sln" Dir.glob('*.sln'){|f| if File.exist? Build.msbuild self.add "\"#{Build.msbuild}\" \"#{f}\" /nologo /p:Configuration=Release" end } end def self.msbuild "C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\msbuild.exe" end def add command self << command if(!include?(command)) end end