dev 1.0.166 → 1.0.167
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dev/MsBuild.rb +14 -1
- data/lib/dev/Scm.rb +1 -0
- data/lib/dev/cmd/Compile.rb +1 -7
- data/lib/dev/cmd/Test.rb +4 -1
- data/lib/dev.rb +1 -1
- metadata +1 -1
data/lib/dev/MsBuild.rb
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
#
|
2
2
|
# C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe vc9/mci.sln /toolsversion:3.5 /property:Configuration=Release /property:Platform=Win32 /l:FileLogger,Microsoft.Build.Engine;logfile=.\log\mci.sln-Release-Build.log
|
3
3
|
# C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
|
4
|
-
#
|
4
|
+
#
|
5
|
+
|
6
|
+
module Dev
|
7
|
+
class MsBuild
|
8
|
+
|
9
|
+
def self.extract_platforms(filename)
|
10
|
+
results = Array::new
|
11
|
+
text=File.read(filename)
|
12
|
+
text.scan(/(\w+)<\/Platform/).each{ | var_match | results << var_match[0].to_s if !results.include?(var_match[0].to_s)}
|
13
|
+
results
|
14
|
+
end
|
15
|
+
|
16
|
+
end # class MsBuild
|
17
|
+
end # moduleDev
|
data/lib/dev/Scm.rb
CHANGED
data/lib/dev/cmd/Compile.rb
CHANGED
@@ -16,7 +16,7 @@ class Compile < Array
|
|
16
16
|
csbuild="<paths,msbuild>"
|
17
17
|
csbuild="xbuild" if !RUBY_PLATFORM.include?("w32")
|
18
18
|
Dir.glob('**/*.csproj').each { |csproj|
|
19
|
-
platforms=Dev::
|
19
|
+
platforms=Dev::MsBuild.extract_platforms(csproj)
|
20
20
|
platforms.each { |platform|
|
21
21
|
skip=(!RUBY_PLATFORM.include?("w32") && platform=="x64")
|
22
22
|
self << "{:cmd=> '#{csbuild} #{csproj} /property:Configuration=Release /property:Platform=\"#{platform}\" /p:OutputPath=./bin/#{platform}/Release', :auto=>true}" if !skip
|
@@ -27,12 +27,6 @@ class Compile < Array
|
|
27
27
|
Dir.glob("*.gemspec").each { |gs| self << "{:cmd=> 'gem build #{gs}', :capture_output=> false, :auto=> true}" }
|
28
28
|
end
|
29
29
|
|
30
|
-
def self.extract_platforms(filename)
|
31
|
-
results = Array::new
|
32
|
-
text=File.read(filename)
|
33
|
-
text.scan(/(\w+)<\/Platform/).each{ | var_match | results << var_match[0].to_s if !results.include?(var_match[0].to_s)}
|
34
|
-
results
|
35
|
-
end
|
36
30
|
end # class Compile
|
37
31
|
end # module Cmd
|
38
32
|
end # module Dev
|
data/lib/dev/cmd/Test.rb
CHANGED
@@ -14,9 +14,12 @@ class Test < Array
|
|
14
14
|
}
|
15
15
|
|
16
16
|
Dir.glob("*.{Test.csproj,Features.csproj}").each { |cs|
|
17
|
-
|
17
|
+
platforms=Dev::MsBuild.extract_platforms(cs)
|
18
|
+
platforms.each { |platform|
|
19
|
+
dll_name="#{DEV[:directory]}/bin/#{platform}/Release/#{File.basename(cs,'.csproj')}.dll"
|
18
20
|
self << "{:cmd=> '<paths,nunit> /xml:#{dll_name}.nunit-results.xml #{dll_name}', :auto=>true, :capture_output=>true, :capture_error=>true}" if RUBY_PLATFORM.include?("w32")
|
19
21
|
self << "{:cmd-> 'mono <paths,nunit> #{dll_name}', :auto=>true}" if !RUBY_PLATFORM.include?("w32")
|
22
|
+
}
|
20
23
|
}
|
21
24
|
|
22
25
|
end
|
data/lib/dev.rb
CHANGED
@@ -39,7 +39,7 @@ end
|
|
39
39
|
|
40
40
|
puts_debug "read " + __FILE__.foreground(:green)
|
41
41
|
|
42
|
-
["Environment","Array","Hash","SystemCall","Paths","Dep","Deps","Database","BoostBuild","Project","Commands","Tasks"].each{ |f| require "#{File.dirname(__FILE__)}/dev/#{f}.rb" }
|
42
|
+
["Environment","Array","Hash","SystemCall","MsBuild","Paths","Dep","Deps","Database","BoostBuild","Project","Commands","Tasks"].each{ |f| require "#{File.dirname(__FILE__)}/dev/#{f}.rb" }
|
43
43
|
Dir["#{File.dirname(__FILE__)}/dev/**/*.rb"].each{ |f| require f }
|
44
44
|
|
45
45
|
DEV_ROOT=Dev::Environment.dev_root
|