diff options
author | Marcel Molina <marcel@vernix.org> | 2005-10-09 21:15:45 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2005-10-09 21:15:45 +0000 |
commit | 68a322005d367981ba72c6a667c16dd171803869 (patch) | |
tree | b92724953eb7798cfc40e07630d550e5d81fb14d /railties | |
parent | c8e364a93f6c2de80fb56ddf2f6a46b6e96f4a9d (diff) | |
download | rails-68a322005d367981ba72c6a667c16dd171803869.tar.gz rails-68a322005d367981ba72c6a667c16dd171803869.tar.bz2 rails-68a322005d367981ba72c6a667c16dd171803869.zip |
Add versioning convention from SwitchTower to all Rails components. Add --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
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/Rakefile | 4 | ||||
-rwxr-xr-x | railties/bin/rails | 4 | ||||
-rw-r--r-- | railties/lib/version.rb | 9 |
4 files changed, 18 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 154e9afb38..64a1c27a2a 100644 --- a/railties/CHANGELOG +++ b/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. diff --git a/railties/Rakefile b/railties/Rakefile index 7724c77c24..981f98893c 100644 --- a/railties/Rakefile +++ b/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}" diff --git a/railties/bin/rails b/railties/bin/rails index f094e4aac7..89a06a37c8 100755 --- a/railties/bin/rails +++ b/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') diff --git a/railties/lib/version.rb b/railties/lib/version.rb new file mode 100644 index 0000000000..cbe47db34f --- /dev/null +++ b/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 |