Skip to content

Commit

Permalink
Make sure deploy:cold also runs migrations before starting the app. H…
Browse files Browse the repository at this point in the history
…ave the capify script emit a commented :deploy_to setting.

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6591 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jamis committed Apr 27, 2007
1 parent c472b36 commit 0964dc1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*SVN*

* deploy:cold should also run migrations before starting the app [Jamis Buck]

* Make the copy strategy check out to a temporary directory [Jamis Buck]


Expand Down
5 changes: 5 additions & 0 deletions bin/capify
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ files = {
set :application, "set your application name here"
set :repository, "set your repository location here"
# If you aren't deploying to /u/apps/\#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
# set :deploy_to, "/var/www/\#{application}"
# If you aren't using Subversion to manage your source code, specify
# your SCM below:
# set :scm, :subversion
Expand Down
16 changes: 8 additions & 8 deletions lib/capistrano/recipes/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,10 @@ def depend(location, type, *args)
deployed version of the app. However, you can specify a different release \
via the migrate_target variable, which must be one of :latest (for the \
default behavior), or :current (for the release indicated by the \
`current' symlink). latest release to be deployed with the update_code \
task). Strings will work for those values instead of symbols, too. You \
can also specify additional environment variables to pass to rake via the \
migrate_env variable. Finally, you can specify the full path to the rake \
executable by setting the rake variable. The defaults are:
`current' symlink). Strings will work for those values instead of symbols,
too. You can also specify additional environment variables to pass to rake
via the migrate_env variable. Finally, you can specify the full path to the
rake executable by setting the rake variable. The defaults are:
set :rake, "rake"
set :rails_env, "production"
Expand Down Expand Up @@ -347,12 +346,13 @@ def depend(location, type, *args)
desc <<-DESC
Deploys and starts a `cold' application. This is useful if you have not \
deployed your application before, or if your application is (for some \
other reason) not currently running. It will deploy the code, and then \
instead of invoking `deploy:restart', it will invoke `deploy:app:start' \
to fire up the application servers.
other reason) not currently running. It will deploy the code, run any \
pending migrations, and then instead of invoking `deploy:restart', it will
invoke `deploy:app:start' to fire up the application servers.
DESC
task :cold do
update
migrate
app.start
end

Expand Down

0 comments on commit 0964dc1

Please sign in to comment.