mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Don't load Haml in the Rakefile unless it's necessary.
This commit is contained in:
parent
b9d4015743
commit
6fc675ef4e
1 changed files with 2 additions and 1 deletions
3
Rakefile
3
Rakefile
|
@ -29,7 +29,6 @@ END
|
|||
# ----- Packaging -----
|
||||
|
||||
require 'rake/gempackagetask'
|
||||
require 'lib/haml'
|
||||
load 'haml.gemspec'
|
||||
|
||||
Rake::GemPackageTask.new(HAML_GEMSPEC) do |pkg|
|
||||
|
@ -41,6 +40,8 @@ Rake::GemPackageTask.new(HAML_GEMSPEC) do |pkg|
|
|||
end
|
||||
|
||||
task :revision_file do
|
||||
require 'lib/haml'
|
||||
|
||||
if Haml.version[:rev] && !Rake.application.top_level_tasks.include?('release')
|
||||
File.open('REVISION', 'w') { |f| f.puts Haml.version[:rev] }
|
||||
elsif Rake.application.top_level_tasks.include?('release')
|
||||
|
|
Loading…
Reference in a new issue