Rakefile in newgem-0.9.2 vs Rakefile in newgem-0.9.3
- old
+ new
@@ -14,13 +14,14 @@
EMAIL = "drnicwilliams@gmail.com"
DESCRIPTION = "Make your own gems at home"
GEM_NAME = "newgem" # what ppl will type to install your gem
RUBYFORGE_PROJECT = "newgem"
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
+DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
REV = nil #File.read(".svn/entries")[/committed-rev="(\d+)"/, 1] rescue nil
-VERS = ENV['VERSION'] || (Newgem::VERSION::STRING + (REV ? ".#{REV}" : ""))
+VERS = Newgem::VERSION::STRING + (REV ? ".#{REV}" : "")
CLEAN.include ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store']
RDOC_OPTS = ['--quiet', '--title', "newgem documentation",
"--opname", "index.html",
"--line-numbers",
"--main", "README",
@@ -74,6 +75,21 @@
ENV['EMAIL'] = EMAIL
ENV['DESCRIPTION'] = DESCRIPTION
ENV['GEM_NAME'] = GEM_NAME
ENV['RUBYFORGE_PROJECT'] = RUBYFORGE_PROJECT
ENV['HOMEPATH'] = HOMEPATH
-end
\ No newline at end of file
+ ENV['DOWNLOAD_PATH'] = DOWNLOAD_PATH
+end
+
+desc 'Release the website and new gem version'
+task :deploy => [:check_version, :website, :release]
+
+task :check_version do
+ unless ENV['VERSION']
+ puts 'Must pass a VERSION=x.y.z release version'
+ exit
+ end
+ unless ENV['VERSION'] == VERS
+ puts "Please update your version.rb to match the release version, currently #{VERS}"
+ exit
+ end
+end