Class: Build

Inherits:
Array show all
Defined in:
lib/tasks/build.rb

Instance Method Summary collapse

Methods inherited from Array

#add, #execute, #to_html

Instance Method Details

#updateObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/tasks/build.rb', line 11

def update

	changed = true
       if(changed)
		Dir.glob('*.gemspec'){|gemspec|
    		add "gem build #{gemspec}" if !File.exist?(Gemspec.gemfile gemspec)
    	}
    	
    	SLN_FILES.each{|sln_file|

    		build_commands = MSBuild.get_build_commands sln_file
    		if(!build_commands.nil?)
    			build_commands.each{|c|
    				self.add c
    			}
    		end
    	}

    	NUGET_FILES.each{|nuget_file|
    		build_commands = Nuget.get_build_commands nuget_file
    		if(!build_commands.nil?)
    			build_commands.each{|c|
    				self.add c
    			}
    		end
    	}

    	WXS_FILES.each{|wxs_file|
    		if(IO.read(wxs_file).include?('<Product'))
    		  build_commands = Wix.get_build_commands wxs_file
    		  if(!build_commands.nil?)
    			build_commands.each{|c|
    				self.add c
    			}
    		  end
    	    end
    	}
    	WXS_FILES.each{|wxs_file|
    		if(IO.read(wxs_file).include?('<Bundle'))
    		  build_commands = Wix.get_build_commands wxs_file
    		  if(!build_commands.nil?)
    			build_commands.each{|c|
    				self.add c
    			}
    		  end
    	    end
    	}
    end
end