dev_commands 0.0.19 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/build.rb +11 -22
- data/lib/commit.rb +3 -0
- data/lib/dev_commands.rb +3 -1
- data/lib/msbuild.rb +13 -2
- metadata +1 -1
data/lib/build.rb
CHANGED
@@ -5,27 +5,16 @@ class Build < Array
|
|
5
5
|
}
|
6
6
|
Dir.glob('**/*.sln'){|sln_file|
|
7
7
|
vs_version=MSBuild.get_vs_version(sln_file)
|
8
|
+
if(defined?(MSBUILD))
|
9
|
+
if(MSBUILD.has_key?(vs_version))
|
10
|
+
MSBuild.get_configurations(f).each{ |configuration|
|
11
|
+
MSBuild.get_platforms(f).each{|platform|
|
12
|
+
Console.debug "configuration='#{configuration}', platform='#{platform}'"
|
13
|
+
self.add "\"#{MSBUILD[vs_version]}\" \"#{f}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"#{platform}\""
|
14
|
+
}
|
15
|
+
}
|
16
|
+
end
|
17
|
+
end
|
8
18
|
}
|
9
|
-
|
10
|
-
|
11
|
-
|
12
19
|
end
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
#glob='**/*.{gemspec,sln}'
|
17
|
-
#glob=DEV_TASKS[:build_glob] if(defined?(DEV_TASKS)) && DEV_TASKS.has_key?(:build_glob)
|
18
|
-
# DEV_TASKS[:files][:build].each {|f|
|
19
|
-
# self.add "gem build #{f}" if(f.include?('.gemspec'))
|
20
|
-
# if(f.include?('.sln'))
|
21
|
-
# vs_version=MSBuild.get_vs_version(f)
|
22
|
-
# if File.exists? msbuild[vs_version]
|
23
|
-
# MSBuild.get_configurations(f).each{ |configuration|
|
24
|
-
# MSBuild.get_platforms(f).each{|platform|
|
25
|
-
# Console.debug "configuration='#{configuration}', platform='#{platform}'"
|
26
|
-
# self.add "\"#{msbuild[vs_version]}\" \"#{f}\" /nologo /p:Configuration=#{configuration} /p:Platform=\"#{platform}\""
|
27
|
-
# }
|
28
|
-
# }
|
29
|
-
# end
|
30
|
-
# end
|
31
|
-
# }
|
20
|
+
end
|
data/lib/commit.rb
CHANGED
data/lib/dev_commands.rb
CHANGED
data/lib/msbuild.rb
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
-
|
1
|
+
# Visual Studio 2008 version 9.0, solution format version 10.00
|
2
|
+
# Visual Studio 2010 version 10.0, solution format version 11.00
|
3
|
+
# Visual Studio 2012 version 11.0, solution format version 12.00
|
4
|
+
# Visual Studio 2013 version 12.0, solution format version 12.00
|
5
|
+
class MSBuild < Hash
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
self[:vs9]="C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe" if(File.exists?("C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe"))
|
9
|
+
self[:vs12]="C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\msbuild.exe" if(File.exists?("C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\msbuild.exe"))
|
10
|
+
end
|
11
|
+
|
2
12
|
def self.get_vs_version(sln_filename)
|
3
13
|
sln_text=File.read(sln_filename,:encoding=>'UTF-8')
|
4
14
|
return :vs9 if sln_text.include?('Format Version 10.00')
|
@@ -24,4 +34,5 @@ class MSBuild
|
|
24
34
|
}
|
25
35
|
return platforms
|
26
36
|
end
|
27
|
-
end
|
37
|
+
end
|
38
|
+
|