Sha256: de12243f1dce714795870daf2c099787d4156c33025d6b1f8d439c17558ae0cf

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

require_relative('msbuild.rb')
require_relative('gemspec.rb')
class Build < Array
	def update

		changed = true
		changed = Git.has_changes? if(File.exists?('.git') && defined?(Git))
		changed = Svn.has_changes? if(File.exists?('.svn') && defined?(Svn))
        if(changed)
			Dir.glob('*.gemspec'){|gemspec|
	    		add "gem build #{gemspec}" if !File.exist?(Gemspec.gemfile gemspec)
	    	}
	    	sln_files=[]
	    	sln_files << Dir.glob('*.sln')
	    	sln_files << Dir.glob('*/*.sln')
	    	sln_files{|sln_file|
	    		vs_version=MSBuild.get_vs_version(sln_file)
				if(MSBuild.has_version?(vs_version))
					MSBuild.get_configurations(sln_file).each{ |configuration|
		      			MSBuild.get_platforms(sln_file).each{|platform|
			    			#Console.debug "configuration='#{configuration}', platform='#{platform}'"
		        			self.add "\"#{MSBuild.get_version(vs_version)}\" \"#{sln_file}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"#{platform}\""
		      			}
		    		}
	            else
	                "puts version #{vs_version} not found for MsBuild"
				end
	    	}
	    end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dev_commands-0.0.43 lib/build.rb