lib/tasks/build.rb in dev-2.0.277 vs lib/tasks/build.rb in dev-2.0.278
- old
+ new
@@ -2,11 +2,10 @@
require_relative('../base/environment.rb')
desc 'performs build commands'
task :build do Tasks.execute_task :build;end
-#task :build do Tasks.execute_task :build;end
SLN_FILES=FileList.new('*.sln','*/*.sln','*/*/*.sln')
NUGET_FILES=FileList.new('**/*.nuspec')
WXS_FILES=FileList.new('**/*.wxs')
@@ -18,59 +17,71 @@
puts "Build scanning for gemspec files" if Environment.default.debug?
Dir.glob('*.gemspec'){|gemspec|
add_quiet("gem build #{gemspec}") if !File.exist?(Gemspec.gemfile gemspec)
}
- puts "Build scanning for sln files" if Environment.default.debug?
- SLN_FILES.each{|sln_file|
+ # Windows
+ if(Environment.windows?)
+ puts "Build scanning for sln files" if Environment.default.debug?
+ SLN_FILES.each{|sln_file|
puts " #{sln_file}" if Environment.default.debug?
build_commands = MSBuild.get_build_commands sln_file
if(!build_commands.nil?)
build_commands.each{|c|
puts " build command #{c} discovered." if Environment.default.debug?
- #self.add c
add_quiet(c)
}
else
puts " no build command discovered." if Environment.default.debug?
end
- }
+ }
- puts "Build scanning for nuget files" if Environment.default.debug?
- NUGET_FILES.each{|nuget_file|
+ puts "Build scanning for nuget files" if Environment.default.debug?
+ NUGET_FILES.each{|nuget_file|
build_commands = Nuget.get_build_commands nuget_file
if(!build_commands.nil?)
build_commands.each{|c|
add_quiet(c)
- #self.add c
}
end
- }
+ }
- puts "Build scanning for wxs <Product> files" if Environment.default.debug?
- WXS_FILES.each{|wxs_file|
+ puts "Build scanning for wxs <Product> files" if Environment.default.debug?
+ 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
add_quiet(c)
}
end
end
- }
+ }
- puts "Build scanning for wxs <Bundle> files" if Environment.default.debug?
- WXS_FILES.each{|wxs_file|
+ puts "Build scanning for wxs <Bundle> files" if Environment.default.debug?
+ 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
add_quiet(c)
}
end
end
- }
+ }
+ end
+
+ # Mac
+ if(Environment.mac?)
+ puts "Build scanning for xcodeproj folders" if Environment.default.debug?
+ Dir.glob('**/*.xcodeproj').each{|dir|
+ build_commands = XCodeBuild.get_build_commands dir
+ if(!build_commands.nil)
+ build_commands.each{|c|
+ add_quiet(c)
+ }
+ end
+ }
+ end
#end
end
end
\ No newline at end of file