Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add versioning convention from SwitchTower to all Rails components. A…

…dd --version, -v option to the 'rails' command. Closes #1840.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2508 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 68a322005d367981ba72c6a667c16dd171803869 1 parent c8e364a
Marcel Molina authored
View
5 actionmailer/Rakefile
@@ -5,10 +5,11 @@ require 'rake/rdoctask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
+require File.join(File.dirname(__FILE__), 'lib', 'version')
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'actionmailer'
-PKG_VERSION = '1.0.1' + PKG_BUILD
+PKG_VERSION = ActionMailer::Version::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
RELEASE_NAME = "REL #{PKG_VERSION}"
@@ -194,4 +195,4 @@ task :release => [:package] do
first_file = false
end
end
-end
+end
View
9 actionmailer/lib/version.rb
@@ -0,0 +1,9 @@
+module ActionMailer
+ module Version
+ MAJOR = 1
+ MINOR = 0
+ TINY = 1
+
+ STRING = [MAJOR, MINOR, TINY].join('.')
+ end
+end
View
5 actionpack/Rakefile
@@ -5,10 +5,11 @@ require 'rake/rdoctask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
+require File.join(File.dirname(__FILE__), 'lib', 'version')
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'actionpack'
-PKG_VERSION = '1.9.1' + PKG_BUILD
+PKG_VERSION = ActionPack::Version::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
RELEASE_NAME = "REL #{PKG_VERSION}"
@@ -239,4 +240,4 @@ task :release => [:package] do
first_file = false
end
end
-end
+end
View
9 actionpack/lib/version.rb
@@ -0,0 +1,9 @@
+module ActionPack
+ module Version
+ MAJOR = 1
+ MINOR = 9
+ TINY = 1
+
+ STRING = [MAJOR, MINOR, TINY].join('.')
+ end
+end
View
3  actionwebservice/Rakefile
@@ -6,10 +6,11 @@ require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
require 'fileutils'
+require File.join(File.dirname(__FILE__), 'lib', 'version')
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'actionwebservice'
-PKG_VERSION = '0.8.1' + PKG_BUILD
+PKG_VERSION = ActionWebService::Version::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
View
9 actionwebservice/lib/version.rb
@@ -0,0 +1,9 @@
+module ActionWebService
+ module Version
+ MAJOR = 0
+ MINOR = 8
+ TINY = 1
+
+ STRING = [MAJOR, MINOR, TINY].join('.')
+ end
+end
View
3  activerecord/Rakefile
@@ -5,10 +5,11 @@ require 'rake/rdoctask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
+require File.join(File.dirname(__FILE__), 'lib', 'version')
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'activerecord'
-PKG_VERSION = '1.11.1' + PKG_BUILD
+PKG_VERSION = ActiveRecord::Version::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
RELEASE_NAME = "REL #{PKG_VERSION}"
View
9 activerecord/lib/version.rb
@@ -0,0 +1,9 @@
+module ActiveRecord
+ module Version
+ MAJOR = 1
+ MINOR = 11
+ TINY = 1
+
+ STRING = [MAJOR, MINOR, TINY].join('.')
+ end
+end
View
5 activesupport/Rakefile
@@ -2,10 +2,11 @@ require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
+require File.join(File.dirname(__FILE__), 'lib', 'version')
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'activesupport'
-PKG_VERSION = '1.1.1' + PKG_BUILD
+PKG_VERSION = ActiveSupport::Version::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
RELEASE_NAME = "REL #{PKG_VERSION}"
@@ -180,4 +181,4 @@ task :release => [:package] do
first_file = false
end
end
-end
+end
View
9 activesupport/lib/version.rb
@@ -0,0 +1,9 @@
+module ActiveSupport
+ module Version
+ MAJOR = 1
+ MINOR = 1
+ TINY = 1
+
+ STRING = [MAJOR, MINOR, TINY].join('.')
+ end
+end
View
2  railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Add --version, -v option to the Rails command. Closes #1840. [stancell]
+
* Update Prototype to V1.4.0_pre11, script.aculo.us to V1.5_rc3 [2504] and fix the rails generator to include the new .js files [Thomas Fuchs]
* Make the generator skip a file if it already exists and is identical to the new file.
View
4 railties/Rakefile
@@ -7,9 +7,11 @@ require 'rake/contrib/rubyforgepublisher'
require 'date'
require 'rbconfig'
+require File.join(File.dirname(__FILE__), 'lib', 'version')
+
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'rails'
-PKG_VERSION = '0.13.1' + PKG_BUILD
+PKG_VERSION = Rails::Version::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
View
4 railties/bin/rails
@@ -11,7 +11,11 @@ end
Signal.trap("INT") { puts; exit }
+require File.dirname(__FILE__) + '/../lib/version'
+abort "Rails #{Rails::Version::STRING}" if %w(--version -v).include? ARGV.first
+
require File.dirname(__FILE__) + '/../lib/rails_generator'
+
require 'rails_generator/scripts/generate'
Rails::Generator::Base.use_application_sources!
Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app')
View
9 railties/lib/version.rb
@@ -0,0 +1,9 @@
+module Rails
+ module Version #:nodoc:
+ MAJOR = 0
+ MINOR = 13
+ TINY = 1
+
+ STRING = [MAJOR, MINOR, TINY].join('.')
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.