diff --git a/Rakefile b/Rakefile index 288c93a6..5ec45659 100644 --- a/Rakefile +++ b/Rakefile @@ -92,8 +92,9 @@ end task :release_elpa do require 'tlsmail' require 'time' + require 'haml' - version = File.read(scope("VERSION")).strip + version = Haml.version[:number] haml_unchanged = mode_unchanged?(:haml, version) sass_unchanged = mode_unchanged?(:sass, version) @@ -105,11 +106,6 @@ task :release_elpa do raise "sass-mode.el doesn't require the same version of haml-mode." end - rev = File.read(scope('.git/HEAD')).strip - if rev =~ /^ref: (.*)$/ - rev = File.read(scope(".git/#{$1}")).strip - end - from = `git config user.email`.strip raise "Don't know how to send emails except via Gmail" unless from =~ /@gmail.com$/ @@ -125,8 +121,8 @@ Date: #{Time.now.rfc2822} haml-mode and sass-mode #{version} are packaged and ready to be included in ELPA. They can be downloaded from: - http://github.com/nex3/haml/raw/#{rev}/extra/haml-mode.el - http://github.com/nex3/haml/raw/#{rev}/extra/sass-mode.el + http://github.com/nex3/haml/raw/#{Haml.version[:rev]}/extra/haml-mode.el + http://github.com/nex3/haml/raw/#{Haml.version[:rev]}/extra/sass-mode.el CONTENT end end