mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-11-16 06:05:00 -05:00
Merge pull request #874 from imathis/catch_deploy_failures
Catch deploy failures
This commit is contained in:
commit
1d210675b7
14
Rakefile
14
Rakefile
@ -325,8 +325,20 @@ multitask :push do
|
||||
puts "\n## Commiting: #{message}"
|
||||
system "git commit -m \"#{message}\""
|
||||
puts "\n## Pushing generated #{deploy_dir} website"
|
||||
system "git push origin #{deploy_branch}"
|
||||
if system "git push origin #{deploy_branch}"
|
||||
puts "\n## GitHub Pages deploy complete"
|
||||
else
|
||||
remote = `git remote -v`
|
||||
repo_url = case remote
|
||||
when /(http[^\s]+)/
|
||||
$1
|
||||
when /(git@[^\s]+)/
|
||||
$1
|
||||
else
|
||||
""
|
||||
end
|
||||
raise "\n## Octopress could not push to #{repo_url}"
|
||||
end
|
||||
end
|
||||
else
|
||||
puts "This project isn't configured for deploying to GitHub Pages\nPlease run `rake setup_github_pages[your-deployment-repo-url]`."
|
||||
|
Loading…
Reference in New Issue
Block a user