Class: Build

Inherits:
Array show all
Defined in:
lib/dev_commands.rb

Instance Method Summary collapse

Methods inherited from Array

#add, #execute, #to_html

Instance Method Details

#updateObject



284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/dev_commands.rb', line 284

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.each{|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