Skip to content
This repository
Browse code

added ext/Rakefile as post-install build step for gem install right_l…

…ink on Windows
  • Loading branch information...
commit 8144ee36715df030b30d97465695a3e5896a3ff9 1 parent dbfe174
Scott Messier smessier authored

Showing 3 changed files with 28 additions and 1 deletion. Show diff stats Hide diff stats

  1. +1 0  .gitignore
  2. +18 0 ext/Rakefile
  3. +9 1 right_link.gemspec
1  .gitignore
@@ -7,3 +7,4 @@ tags
7 7 .project
8 8 .loadpath
9 9 nbproject/
  10 +pkg/
18 ext/Rakefile
... ... @@ -0,0 +1,18 @@
  1 +require 'rubygems'
  2 +require 'rake'
  3 +
  4 +desc "Builds any binaries local to right_link"
  5 +task :default do
  6 + if RUBY_PLATFORM =~ /mswin|mingw/
  7 + task = 'build'
  8 + ms_build_path = "#{ENV['WINDIR']}\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe"
  9 + right_link_root = ::File.expand_path(::File.join(::File.dirname(__FILE__), '..'))
  10 + Dir.chdir(File.join(right_link_root, 'lib', 'chef', 'windows', 'ChefNodeCmdlet')) do
  11 + # Note that we can build C# components using msbuild instead of needing to
  12 + # have Developer Studio installed
  13 + build_command = "#{ms_build_path} ChefNodeCmdlet.sln /t:#{task} /p:configuration=Release > ChefNodeCmdlet.build.txt 2>&1"
  14 + puts "#{build_command}"
  15 + `#{build_command}`
  16 + end
  17 + end
  18 +end
10 right_link.gemspec
@@ -43,10 +43,18 @@ spec = Gem::Specification.new do |s|

0 comments on commit 8144ee3

Please sign in to comment.
Something went wrong with that request. Please try again.