diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-11-10 15:18:21 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-11-10 15:18:21 -0800 |
commit | ec2b2654e5dfc6cf6ec7255083561f1304e234d3 (patch) | |
tree | e7e94f505d287bacfc5fe501057ad341233ee636 | |
parent | a4aa95ba0ca9c0a6282ed3d70d63be91acf7ab6d (diff) | |
download | rails-ec2b2654e5dfc6cf6ec7255083561f1304e234d3.tar.gz rails-ec2b2654e5dfc6cf6ec7255083561f1304e234d3.tar.bz2 rails-ec2b2654e5dfc6cf6ec7255083561f1304e234d3.zip |
Make root_dir a method so rails can call it
-rwxr-xr-x | ci/ci_build.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ci/ci_build.rb b/ci/ci_build.rb index cb3be9265b..b62cca09a5 100755 --- a/ci/ci_build.rb +++ b/ci/ci_build.rb @@ -1,12 +1,17 @@ #!/usr/bin/env ruby require 'fileutils' - include FileUtils -puts "[CruiseControl] Rails build" +def root_dir + @root_dir ||= File.expand_path('../..', __FILE__) +end + +def rake(*tasks) + tasks.map { |task| system "#{root_dir}/bin/rake", task }.join("\n") +end +puts "[CruiseControl] Rails build" build_results = {} -root_dir = File.expand_path('../..', __FILE__) # Requires gem home and path to be writeable and/or overridden to be ~/.gem, # Will enable when RubyGems supports this properly (in a coming release) @@ -16,10 +21,6 @@ root_dir = File.expand_path('../..', __FILE__) # A security hole, but there is nothing valuable on rails CI box anyway. build_results[:geminstaller] = system "sudo geminstaller --config=#{root_dir}/ci/geminstaller.yml --exceptions" -def rake(*tasks) - tasks.map { |task| system "#{root_dir}/bin/rake", task }.join("\n") -end - cd root_dir do puts puts "[CruiseControl] Bundling RubyGems" |