lib/artifacts.rb in dev_tasks-0.0.58 vs lib/artifacts.rb in dev_tasks-0.0.59
- old
+ new
@@ -12,18 +12,23 @@
# C# dll, bin/Net4.0/QcNet.dll
Dir.glob("*.csproj").each{|p|
text = File.read(p)
# extract AssemblyName of form: <AssemblyName>MyLibrary.Test</AssemblyName>
assemblyName=text[/<AssemblyName>([\w\.]+)</,1]
+ outputType=text[/<OutputType>([\w\.]+)</,1]
outputPath=text[/Release[.\w\W]+<OutputPath>([\w\.\\]+)</,1]
if(!assemblyName.nil? && !outputPath.nil? && !assemblyName.include?("Test"))
- cs_dll = "#{outputPath}\\#{assemblyName}.dll".gsub("\\\\","\\").gsub('/','\\').gsub('\\','/')
- self << cs_dll if(!self.include?(cs_dll))
+ extension="dll"
+ extension="exe" if(outputType=="WinExe")
+ artifact = "#{outputPath}\\#{assemblyName}.#{extension}".gsub("\\\\","\\").gsub('/','\\').gsub('\\','/')
+
+ self << artifact if(!self.include?(artifact))
+
# add in file dependencies
Dependencies.csharp_file_dependencies(text).each{|dep|
- cs_dll_dep=dep.gsub(File.dirname(dep),File.dirname(cs_dll)).gsub('\\','/')
+ cs_dll_dep=dep.gsub(File.dirname(dep),File.dirname(artifact)).gsub('\\','/')
self << cs_dll_dep if(!self.include?(cs_dll_dep))
}
end
}
end
\ No newline at end of file