Browse code

Allows '-' in deployment branch names, fixes #213

Frederic Hemberger authored on 11/10/2011 at 12:20:52
Showing 1 changed files
... ...
@@ -283,7 +283,7 @@ desc "Set up _deploy folder and deploy branch for Github Pages deployment"
283 283
 task :setup_github_pages do
284 284
   repo_url = get_stdin("Enter the read/write url for your repository: ")
285 285
   user = repo_url.match(/:([^\/]+)/)[1]
286
-  branch = (repo_url.match(/\/\w+.github.com/).nil?) ? 'gh-pages' : 'master'
286
+  branch = (repo_url.match(/\/[\w-]+.github.com/).nil?) ? 'gh-pages' : 'master'
287 287
   project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''
288 288
   unless `git remote -v`.match(/origin.+?octopress.git/).nil?
289 289
     # If octopress is still the origin remote (from cloning) rename it to octopress