Use Haml.version for figuring out version numbers when releasing to elpa.

This commit is contained in:
Nathan Weizenbaum 2010-02-28 16:53:58 -08:00
parent e167efa5ae
commit 956f2d98b1
1 changed files with 4 additions and 8 deletions

View File

@ -92,8 +92,9 @@ end
task :release_elpa do task :release_elpa do
require 'tlsmail' require 'tlsmail'
require 'time' require 'time'
require 'haml'
version = File.read(scope("VERSION")).strip version = Haml.version[:number]
haml_unchanged = mode_unchanged?(:haml, version) haml_unchanged = mode_unchanged?(:haml, version)
sass_unchanged = mode_unchanged?(:sass, 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." raise "sass-mode.el doesn't require the same version of haml-mode."
end 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 from = `git config user.email`.strip
raise "Don't know how to send emails except via Gmail" unless from =~ /@gmail.com$/ 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. haml-mode and sass-mode #{version} are packaged and ready to be included in ELPA.
They can be downloaded from: They can be downloaded from:
http://github.com/nex3/haml/raw/#{rev}/extra/haml-mode.el http://github.com/nex3/haml/raw/#{Haml.version[: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/sass-mode.el
CONTENT CONTENT
end end
end end