Browse code

setup_github_pages: allow for clones missing .git extension

Vaz Allen authored on 03/10/2012 at 18:50:08
Showing 1 changed files
... ...
@@ -310,7 +310,7 @@ task :setup_github_pages, :repo do |t, args|
310 310
   user = repo_url.match(/:([^\/]+)/)[1]
311 311
   branch = (repo_url.match(/\/[\w-]+.github.com/).nil?) ? 'gh-pages' : 'master'
312 312
   project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''
313
-  unless `git remote -v`.match(/origin.+?octopress.git/).nil?
313
+  unless `git remote -v`.match(/origin.+?octopress(?:\.git)?/).nil?
314 314
     # If octopress is still the origin remote (from cloning) rename it to octopress
315 315
     system "git remote rename origin octopress"
316 316
     if branch == 'master'