Sha256: 1e8bb7aa8a0ce01a11a70d0b99edd17f918ff1b0f4d1d10bb01cc60db0bffaf1
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
module Dev module Cmd class Compile def self.get_auto_compile_directives array=Array.new windows=RUBY_PLATFORM.include?("w32") # jamfiles # vcxproj Dir.glob('**/*.vcxproj').each { |vcxproj| array << "<paths,msbuild> #{vcxproj} /property:Configuration=Release /property:Platform=Win32" } if windows # csproj csbuild="<paths,msbuild>" csbuild="xbuild" if !RUBY_PLATFORM.include?("w32") Dir.glob('**/*.csproj').each { |csproj| platforms=Dev::Cmd::Compile.extract_platforms(csproj) platforms.each { |platform| skip=(!RUBY_PLATFORM.include?("w32") && platform=="x64") array << "#{csbuild} #{csproj} /property:Configuration=Release /property:Platform=\"#{platform}\" /p:OutputPath=./bin/#{platform}/Release" if !skip } } # gemspec Dir.glob("*.gemspec").each { |gs| array << "{ :cmd=> 'gem build #{gs}', :capture_output=> false}" } array=nil if array.empty? return array end def self.extract_platforms(filename) results = Array::new text=File.read(filename) text.scan(/(\w+)<\/Platform/).each{ | var_match | results << var_match[0].to_s if !results.include?(var_match[0].to_s)} results end end # class Compile end # module Cmd end # module Dev
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dev-1.0.146 | lib/dev/cmd/Compile.rb |