Sha256: 33db102dfcf5c6c0c2f3e8056c87b9be62cc3db9bbf0e2b01a07e8f261466014

Contents?: true

Size: 1.07 KB

Versions: 31

Compression:

Stored size: 1.07 KB

Contents

require_relative './color.rb'
require_relative './msbuild.rb'

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"
	msbuild=MSBuild.new
	Dir.glob('**/*.sln'){|f|
	  vs_version=MSBuild.get_vs_version(f)
	  if File.exist? msbuild[vs_version]
	    MSBuild.get_configurations(f).each{ |configuration|
		  MSBuild.get_platforms(f).each{|platform|
		    self.add "\"#{msbuild[vs_version]}\" \"#{f}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"#{platform}\""
		  }
		  #self.add "\"#{msbuild[vs_version]}\" \"#{f}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"Any CPU\""
		}
	    #self.add "\"#{msbuild[vs_version]}\" \"#{f}\" /nologo /p:Configuration=Release /p:Platform=\"Any CPU\""
	  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

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
dev_tasks-0.0.121 lib/build.rb
dev_tasks-0.0.120 lib/build.rb
dev_tasks-0.0.119 lib/build.rb
dev_tasks-0.0.118 lib/build.rb
dev_tasks-0.0.117 lib/build.rb
dev_tasks-0.0.116 lib/build.rb
dev_tasks-0.0.115 lib/build.rb
dev_tasks-0.0.114 lib/build.rb
dev_tasks-0.0.113 lib/build.rb
dev_tasks-0.0.112 lib/build.rb
dev_tasks-0.0.111 lib/build.rb