Sha256: ccc948a76993a51dd6e5442d9a6f940f1d57b6ba1b73861bc5ba281d1d100944

Contents?: true

Size: 1.18 KB

Versions: 47

Compression:

Stored size: 1.18 KB

Contents

require_relative('./dependencies.rb')

class Artifacts < Array
  def initialize 
    # gem, dev_tasks-0.0.7.gem
	Dir.glob('*.gemspec') {|f|
	  spec=Gem::Specification.load(f)
	  artifact="#{spec.name}-#{spec.version.to_s}.gem"
	  self << artifact if(!self.include?(artifact))
	}

	# 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"))

	    extension="dll"
		extension="exe" if(outputType=="WinExe" || outputType=="Exe")

		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(artifact)).gsub('\\','/')
		  self << cs_dll_dep if(!self.include?(cs_dll_dep))
		}
	  end
	}
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
dev_tasks-0.0.112 lib/artifacts.rb
dev_tasks-0.0.111 lib/artifacts.rb
dev_tasks-0.0.110 lib/artifacts.rb
dev_tasks-0.0.109 lib/artifacts.rb
dev_tasks-0.0.108 lib/artifacts.rb
dev_tasks-0.0.107 lib/artifacts.rb
dev_tasks-0.0.106 lib/artifacts.rb
dev_tasks-0.0.105 lib/artifacts.rb
dev_tasks-0.0.104 lib/artifacts.rb
dev_tasks-0.0.103 lib/artifacts.rb
dev_tasks-0.0.102 lib/artifacts.rb
dev_tasks-0.0.101 lib/artifacts.rb
dev_tasks-0.0.100 lib/artifacts.rb
dev_tasks-0.0.99 lib/artifacts.rb
dev_tasks-0.0.98 lib/artifacts.rb
dev_tasks-0.0.97 lib/artifacts.rb
dev_tasks-0.0.96 lib/artifacts.rb
dev_tasks-0.0.94 lib/artifacts.rb
dev_tasks-0.0.93 lib/artifacts.rb
dev_tasks-0.0.92 lib/artifacts.rb