Class: Build

Inherits:
Array
  • Object
show all
Defined in:
lib/build.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBuild

Returns a new instance of Build.



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/build.rb', line 5

def initialize
  # Gem builds, `gem build dev_tasks.spec`
	Dir.glob('*.gemspec') {|f|
 self.add "gem build #{f}"
	}
	# .sln builds, `"C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe" "MySolution.sln"
	Dir.glob('*.sln'){|f|
 if File.exist? Build.msbuild
   self.add "\"#{Build.msbuild}\" \"#{f}\" /nologo /p:Configuration=Release"
 end
	}
end

Class Method Details

.msbuildObject



18
19
20
# File 'lib/build.rb', line 18

def self.msbuild
  "C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\msbuild.exe"
end

Instance Method Details

#add(command) ⇒ Object



22
23
24
# File 'lib/build.rb', line 22

def add command
  self << command if(!include?(command))
end