Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 206
- Log:
Initial import of Gullery, an open source photo gallery:
http://nubyonrails.com/pages/gullery
- Author:
- rool
- Date:
- Sun May 20 19:05:59 +0100 2007
- Size:
- 3341 Bytes
1 | # ============================================================================= |
2 | # A set of rake tasks for invoking the Capistrano automation utility. |
3 | # ============================================================================= |
4 | |
5 | # Invoke the given actions via Capistrano |
6 | def cap(*parameters) |
7 | begin |
8 | require 'rubygems' |
9 | rescue LoadError |
10 | # no rubygems to load, so we fail silently |
11 | end |
12 | |
13 | require 'capistrano/cli' |
14 | |
15 | Capistrano::CLI.new(parameters.map { |param| param.to_s }).execute! |
16 | end |
17 | |
18 | namespace :remote do |
19 | desc "Removes unused releases from the releases directory." |
20 | task(:cleanup) { cap :cleanup } |
21 | |
22 | desc "Used only for deploying when the spinner isn't running." |
23 | task(:cold_deploy) { cap :cold_deploy } |
24 | |
25 | desc "A macro-task that updates the code, fixes the symlink, and restarts the application servers." |
26 | task(:deploy) { cap :deploy } |
27 | |
28 | desc "Similar to deploy, but it runs the migrate task on the new release before updating the symlink." |
29 | task(:deploy_with_migrations) { cap :deploy_with_migrations } |
30 | |
31 | desc "Displays the diff between HEAD and what was last deployed." |
32 | task(:diff_from_last_deploy) { cap :diff_from_last_deploy } |
33 | |
34 | desc "Disable the web server by writing a \"maintenance.html\" file to the web servers." |
35 | task(:disable_web) { cap :disable_web } |
36 | |
37 | desc "Re-enable the web server by deleting any \"maintenance.html\" file." |
38 | task(:enable_web) { cap :enable_web } |
39 | |
40 | desc "A simple task for performing one-off commands that may not require a full task to be written for them." |
41 | task(:invoke) { cap :invoke } |
42 | |
43 | desc "Run the migrate rake task." |
44 | task(:migrate) { cap :migrate } |
45 | |
46 | desc "Restart the FCGI processes on the app server." |
47 | task(:restart) { cap :restart } |
48 | |
49 | desc "A macro-task that rolls back the code and restarts the application servers." |
50 | task(:rollback) { cap :rollback } |
51 | |
52 | desc "Rollback the latest checked-out version to the previous one by fixing the symlinks and deleting the current release from all servers." |
53 | task(:rollback_code) { cap :rollback_code } |
54 | |
55 | desc "Set up the expected application directory structure on all boxes" |
56 | task(:setup) { cap :setup } |
57 | |
58 | desc "Enumerate and describe every available task." |
59 | task(:show_tasks) { cap :show_tasks, '-q' } |
60 | |
61 | desc "Start the spinner daemon for the application (requires script/spin)." |
62 | task(:spinner) { cap :spinner } |
63 | |
64 | desc "Update the 'current' symlink to point to the latest version of the application's code." |
65 | task(:symlink) { cap :symlink } |
66 | |
67 | desc "Update all servers with the latest release of the source code." |
68 | task(:update_code) { cap :update_code } |
69 | |
70 | desc "Update the currently released version of the software directly via an SCM update operation" |
71 | task(:update_current) { cap :update_current } |
72 | |
73 | desc "Execute a specific action using capistrano" |
74 | task :exec do |
75 | unless ENV['ACTION'] |
76 | raise "Please specify an action (or comma separated list of actions) via the ACTION environment variable" |
77 | end |
78 | |
79 | actions = ENV['ACTION'].split(",") |
80 | actions.concat(ENV['PARAMS'].split(" ")) if ENV['PARAMS'] |
81 | |
82 | cap(*actions) |
83 | end |
84 | end |
85 | |
86 | desc "Push the latest revision into production (delegates to remote:deploy)" |
87 | task :deploy => "remote:deploy" |
88 | |
89 | desc "Rollback to the release before the current release in production (delegates to remote:rollback)" |
90 | task :rollback => "remote:rollback" |