Class: Build
Instance Attribute Summary
Attributes inherited from Array
#env
Instance Method Summary
collapse
Methods inherited from Array
#add, #add_passive, #add_quiet, #execute, #has_command?, #initialize, #log_debug_info, #to_html
Constructor Details
This class inherits a constructor from Array
Instance Method Details
#update_dotnet ⇒ Object
37
38
39
40
|
# File 'lib/tasks/build.rb', line 37
def update_dotnet
add_quiet "dotnet build" if File.exist?("project.json")
end
|
#update_gemspec ⇒ Object
30
31
32
33
34
35
|
# File 'lib/tasks/build.rb', line 30
def update_gemspec
Dir.glob("*.gemspec") do |gemspec|
add_quiet("gem build #{gemspec}") unless File.exist?(Gemspec.gemfile(gemspec))
end
end
|
#update_sln ⇒ Object
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/tasks/build.rb', line 42
def update_sln
SLN_FILES.each do |sln_file|
puts " #{sln_file}" if Environment.default.debug?
build_commands = MSBuild.get_build_commands sln_file
if !build_commands.nil?
build_commands.each do |c|
puts " build command #{c} discovered." if Environment.default.debug?
add_quiet(c)
end
elsif Environment.default.debug?
puts " no build command discovered."
end
end
end
|
#update_smartassembly ⇒ Object
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# File 'lib/tasks/build.rb', line 58
def update_smartassembly
sa = "C:/Program Files/Red Gate/SmartAssembly 6/SmartAssembly.com"
if File.exist?("C:/Program Files/Red Gate/SmartAssembly 7/SmartAssembly.com")
sa = "C:/Program Files/Red Gate/SmartAssembly 7/SmartAssembly.com"
end
SMARTASSEMBLY_FILES.each do |saproj_file|
puts " #{saproj_file}" if Environment.default.debug?
if !File.exist?(sa)
puts "warning: #{sa} does not exist, skipping build command for #{saproj_file}"
else
add_quiet("\"#{sa}\" /build #{saproj_file}")
end
end
end
|
#update_wix ⇒ Object
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
# File 'lib/tasks/build.rb', line 74
def update_wix
WXS_FILES.each do |wxs_file|
next unless IO.read(wxs_file).include?("<Product")
build_commands = Wix.get_build_commands wxs_file
next if build_commands.nil?
build_commands.each do |c|
add_quiet(c)
end
end
WXS_FILES.each do |wxs_file|
next unless IO.read(wxs_file).include?("<Bundle")
build_commands = Wix.get_build_commands wxs_file
next if build_commands.nil?
build_commands.each do |c|
add_quiet(c)
end
end
end
|
#update_xcode ⇒ Object
100
101
102
103
104
105
106
107
108
109
110
111
|
# File 'lib/tasks/build.rb', line 100
def update_xcode
Dir.glob("**/*.xcodeproj").each do |dir|
puts dir if Environment.default.debug?
build_commands = XCodeBuild.get_build_commands dir
next if build_commands.nil?
build_commands.each do |c|
build_commands << c
end
end
end
|