Class: Artifacts
- Inherits:
-
Hash
- Object
- Hash
- Artifacts
- Defined in:
- lib/artifacts.rb
Instance Method Summary collapse
-
#initialize ⇒ Artifacts
constructor
A new instance of Artifacts.
Constructor Details
#initialize ⇒ Artifacts
Returns a new instance of Artifacts.
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/artifacts.rb', line 2 def initialize # gem, dev_tasks-0.0.7.gem Dir.glob('*.gemspec') {|f| spec=Gem::Specification.load(f) self[spec.name]="#{spec.name}-#{spec.version.to_s}.gem" } # 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] outputPath=text[/Release[.\w\W]+<OutputPath>([\w\.\\]+)</,1] if(!assemblyName.nil? && !outputPath.nil? && !assemblyName.include?("Test")) cs_dll = "#{outputPath}\\#{assemblyName}.dll".gsub("\\\\","\\").gsub('/','\\') self[assemblyName]=cs_dll end } end |