From: Giorgio Lando Date: Tue, 5 Feb 2008 17:31:14 +0000 (+0100) Subject: allow user to make a gem with a specific version number X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=0bceb8d5f767cd8766844ef6d8d36a7c058ea36c;p=sup allow user to make a gem with a specific version number If one want to make a gem from a git version of sup, he can also want to define a version number (e.g. in the form .1, so that when a new version is released the gem will be updated nonetheless). With this patch the version can be defined with the REL environment variable (as in ferret Rakefile) --- diff --git a/Rakefile b/Rakefile index f99246f..289da64 100644 --- a/Rakefile +++ b/Rakefile @@ -9,9 +9,13 @@ end # thanks to "Mike H" ## allow people who use development versions by running "rake gem" ## and installing the resulting gem it to be able to do this. (gem -## versions must be in dotted-digit notation only). -version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION - +## versions must be in dotted-digit notation only and can be passed +## with the REL environment variable to "rake gem"). +if ENV['REL'] + version = ENV['REL'] +else + version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION +end Hoe.new('sup', version) do |p| p.rubyforge_name = 'sup' p.author = "William Morgan"