Permalink
Browse files

adding support for a /stage instance

  • Loading branch information...
1 parent 49a07ac commit c646161e6492712fe0bae17be9decfc4457a1657 @coolo coolo committed Mar 3, 2010
View
@@ -18,6 +18,13 @@
# via the :deploy_to variable:
set :deploy_to, "/srv/www/vhosts/opensuse.org/#{application}"
+# set variables for different target deployments
+task :stage do
+ set :deploy_to, "/srv/www/vhosts/opensuse.org/stage/#{application}"
+ set :runit_name, "software_stage"
+ set :branch, "derivates"
+end
+
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
@@ -43,6 +50,8 @@
run "ln -s #{shared_path}/production.rb #{release_path}/config/environments/"
run "rm -f #{release_path}/config/database.yml"
run "ln -s #{shared_path}/database.yml #{release_path}/config/database.yml"
+ run "rm -f #{release_path}/config/options.yml"
+ run "ln -s #{shared_path}/options.yml #{release_path}/config/options.yml"
run "rm -r #{release_path}/tmp/cache"
run "ln -s #{shared_path}/software.o.o.cache #{release_path}/tmp/cache"
end
@@ -7,6 +7,9 @@
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
+CONFIG = YAML.load_file("#{RAILS_ROOT}/config/options.yml") || Hash.new
+ActionController::Base.relative_url_root = CONFIG['relative_url_root'] if CONFIG['relative_url_root']
+
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
@@ -1,7 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
-# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
-
-# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
-# Rails.backtrace_cleaner.remove_silencers!
@@ -1,10 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-# Add new inflection rules using the following format
-# (all these examples are active by default):
-# ActiveSupport::Inflector.inflections do |inflect|
-# inflect.plural /^(ox)$/i, '\1en'
-# inflect.singular /^(ox)en/i, '\1'
-# inflect.irregular 'person', 'people'
-# inflect.uncountable %w( fish sheep )
-# end
@@ -1,5 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-# Add new mime types for use in respond_to blocks:
-# Mime::Type.register "text/richtext", :rtf
-# Mime::Type.register_alias "text/html", :iphone
View
@@ -0,0 +1,3 @@
+# Set this when the webclient runs from a subdirectory
+#relative_url_root: /stage
+
View
@@ -1 +1 @@
-*
+*.log

0 comments on commit c646161

Please sign in to comment.