mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Move freeze root code into extconf
Trying to run rake tasks in an unpacked gem is unreliable
This commit is contained in:
parent
bb43b1304b
commit
8642a371c6
2 changed files with 9 additions and 12 deletions
10
Rakefile
10
Rakefile
|
@ -75,16 +75,6 @@ task :install => [:package] do
|
||||||
sh %{#{sudo} #{gem} install --no-ri pkg/haml-#{File.read(scope('VERSION')).strip}}
|
sh %{#{sudo} #{gem} install --no-ri pkg/haml-#{File.read(scope('VERSION')).strip}}
|
||||||
end
|
end
|
||||||
|
|
||||||
task :freeze_root do
|
|
||||||
File.open(scope("lib/haml/root.rb"), "w") do |f|
|
|
||||||
f << <<-RUBY
|
|
||||||
module Haml
|
|
||||||
ROOT_DIR = #{File.expand_path(File.dirname(__FILE__)).inspect}
|
|
||||||
end
|
|
||||||
RUBY
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
desc "Release a new Haml package to Rubyforge."
|
desc "Release a new Haml package to Rubyforge."
|
||||||
task :release => [:check_release, :release_elpa, :package] do
|
task :release => [:check_release, :release_elpa, :package] do
|
||||||
name = File.read(scope("VERSION_NAME")).strip
|
name = File.read(scope("VERSION_NAME")).strip
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
File.open('Makefile', 'w') do |f|
|
root = File.expand_path("../..", __FILE__)
|
||||||
f.puts("install:\n\trake freeze_root")
|
File.open(File.expand_path("lib/haml/root.rb", root), "w") do |f|
|
||||||
|
f << <<-RUBY
|
||||||
|
module Haml
|
||||||
|
ROOT_DIR = #{root.inspect}
|
||||||
end
|
end
|
||||||
|
RUBY
|
||||||
|
end
|
||||||
|
|
||||||
|
File.open('Makefile', 'w') { |f| f.puts("install:\n\texit 0") }
|
||||||
|
|
Loading…
Add table
Reference in a new issue