mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Recapped an issue as a PR
fixed #694 Just listed out the other two ways to implement this as discussed in the issue.
This commit is contained in:
parent
c7dcf87cc7
commit
77357d187e
1 changed files with 16 additions and 1 deletions
17
README.md
17
README.md
|
@ -141,7 +141,7 @@ Perfect, who needs telephones.
|
|||
Local tasks can be run by replacing `on` with `run_locally`
|
||||
|
||||
``` ruby
|
||||
desc "Notify service of deployment"
|
||||
desc 'Notify service of deployment'
|
||||
task :notify do
|
||||
run_locally do
|
||||
with rails_env: :development do
|
||||
|
@ -151,6 +151,21 @@ task :notify do
|
|||
end
|
||||
```
|
||||
|
||||
Of course, you can always just use standard ruby syntax to run things locally
|
||||
``` ruby
|
||||
desc 'Notify service of deployment'
|
||||
task :notify do
|
||||
%x('RAILS_ENV=development bundle exec rake "service:notify"')
|
||||
end
|
||||
```
|
||||
|
||||
Alternatively you could use the rake syntax
|
||||
``` ruby
|
||||
desc "Notify service of deployment"
|
||||
task :notify do
|
||||
sh 'RAILS_ENV=development bundle exec rake "service:notify"'
|
||||
end
|
||||
```
|
||||
## Console
|
||||
|
||||
**Note:** Here be dragons. The console is very immature, but it's much more
|
||||
|
|
Loading…
Reference in a new issue