Permalink
Browse files

Add YARD_VERSION env to Rakefile. Allows installing as arbitrary gem …

…version with `rake install YARD_VERSION=x.y`

Note that this does not change YARD::VERSION in the installed gem itself.
  • Loading branch information...
1 parent 95b6045 commit f27213b4628230eddb7f80c2a34880ee46bbdb99 @lsegal committed Jul 5, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 Rakefile
View
@@ -1,14 +1,16 @@
require File.dirname(__FILE__) + '/lib/yard'
require 'rbconfig'
+YARD::VERSION.replace(ENV['YARD_VERSION']) if ENV['YARD_VERSION']
WINDOWS = (Config::CONFIG['host_os'] =~ /mingw|win32|cygwin/ ? true : false) rescue false
SUDO = WINDOWS ? '' : 'sudo'
task :default => :specs
desc "Builds the gem"
task :gem do
- sh "gem build yard.gemspec"
+ load 'yard.gemspec'
+ Gem::Builder.new(SPEC).build
end
desc "Installs the gem"

0 comments on commit f27213b

Please sign in to comment.