Skip to content

Commit ce0d251

Browse files
committed
now Github repo url can be specified inline setup_github_pages command
1 parent fca7f10 commit ce0d251

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Rakefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,12 @@ task :set_root_dir, :dir do |t, args|
295295
end
296296

297297
desc "Set up _deploy folder and deploy branch for Github Pages deployment"
298-
task :setup_github_pages do
299-
repo_url = get_stdin("Enter the read/write url for your repository: ")
298+
task :setup_github_pages, :repo do |t, args|
299+
if args.repo
300+
repo_url = args.repo
301+
else
302+
repo_url = get_stdin("Enter the read/write url for your repository: ")
303+
end
300304
user = repo_url.match(/:([^\/]+)/)[1]
301305
branch = (repo_url.match(/\/[\w-]+.github.com/).nil?) ? 'gh-pages' : 'master'
302306
project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''

0 commit comments

Comments
 (0)