Commit a0322c853890bba4e86ab5f1b009c90c931e32cc
1 parent
6bc6b7e8
Exists in
master
and in
1 other branch
check to see if remote exists when pulling suspenders. add it if not.
Showing
1 changed file
with
7 additions
and
2 deletions
Show diff stats
lib/tasks/suspenders.rake
| 1 | 1 | namespace :suspenders do |
| 2 | 2 | desc "Pull the latest Heroku Suspenders" |
| 3 | 3 | task :pull do |
| 4 | - `git pull heroku_suspenders master` | |
| 4 | + remote = "heroku_suspenders" | |
| 5 | + source = "git://github.com/dancroak/heroku_suspenders.git" | |
| 6 | + remotes = `git remote show` | |
| 7 | + unless remotes.split("\n").include?(remote) | |
| 8 | + `git remote add #{remote} #{source}` | |
| 9 | + end | |
| 10 | + `git pull #{remote} master` | |
| 5 | 11 | end |
| 6 | 12 | end |
| 7 | 13 | |
| 8 | - | ... | ... |