2015-03-31 68 views

回答

0

也許你想要這樣的東西?

# in lib/tasks/github.rake 

namespace :github do 
    desc "Push locale stored in `config/locales/en.yml` to github" 
    task :push_locale do |t| 
     sh "git add config/locales/en.yml" 
     sh "git commit -m 'Update locale.'" 
     sh "git push" 
    end 
end 

,然後調用任務與rake github:push_locale

+0

OK!太好了,謝謝! – huynhthinh 2015-04-01 17:03:51