Skip to content

Commit ceac2d2

Browse files
committed
Fixed repo_url detection regex
1 parent 3a2a5d9 commit ceac2d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ task :setup_github_pages, :repo do |t, args|
322322
user = repo_url.match(/github\.com\/([^\/]+)/)[1]
323323
end
324324
branch = (repo_url.match(/\/[\w-]+\.github\.(?:io|com)/).nil?) ? 'gh-pages' : 'master'
325-
project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''
325+
project = (branch == 'gh-pages') ? repo_url.match(/([^\/]+?)(\.git|$)/i)[1] : ''
326326
unless (`git remote -v` =~ /origin.+?octopress(?:\.git)?/).nil?
327327
# If octopress is still the origin remote (from cloning) rename it to octopress
328328
system "git remote rename origin octopress"

0 commit comments

Comments
 (0)