Skip to content

Commit f91e6b1

Browse files
committed
Add —config to ruby code
Defaults to `_config-deploy.yml` for backward compatability.
1 parent 249cf24 commit f91e6b1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/jgd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@ Usage: jgd [options]
1111
opt :url, 'Github URL', type: String, default: ''
1212
opt :branch, 'Destination branch', type: String, default: 'gh-pages'
1313
opt :branch_from, 'Source branch', type: String, default: 'master'
14+
opt :config, 'Deploy Config File', type: String, default: '_config-deploy.yml'
1415
end
1516

1617
branch = opts[:branch]
1718
branch_from = opts[:branch_from]
19+
config = opts[:config]
1820
fail 'branch can\'t be empty' if branch.empty?
1921
fail 'branch-from can\'t be empty' if branch_from.empty?
22+
fail 'config can\'t be empty' if config.empty?
2023
url = opts[:url]
2124
url = `git config --get remote.origin.url`.strip if url.empty?
2225

@@ -25,4 +28,4 @@ root = spec.gem_dir
2528
script = File.join(root, 'bash/deploy.sh')
2629

2730
fail 'deployment failed, see log above' \
28-
unless system("#{script} #{url} #{branch} #{branch_from}")
31+
unless system("#{script} #{url} #{branch} #{branch_from} #{config}")

0 commit comments

Comments
 (0)