require_relative './color.rb' require_relative './commandarray.rb' require_relative './msbuild.rb' class Build < CommandArray def update if(defined?(DEV_TASKS)) msbuild=MSBuild.new #glob='**/*.{gemspec,sln}' #glob=DEV_TASKS[:build_glob] if(defined?(DEV_TASKS)) && DEV_TASKS.has_key?(:build_glob) DEV_TASKS[:files][:build].each {|f| self.add "gem build #{f}" if(f.include?('.gemspec')) if(f.include?('.sln')) vs_version=MSBuild.get_vs_version(f) if File.exists? msbuild[vs_version] MSBuild.get_configurations(f).each{ |configuration| MSBuild.get_platforms(f).each{|platform| Console.debug "configuration='#{configuration}', platform='#{platform}'" self.add "\"#{msbuild[vs_version]}\" \"#{f}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"#{platform}\"" } } end end } end end end