bin/jgd in jgd-1.9 vs bin/jgd in jgd-1.10
- old
+ new
@@ -10,22 +10,24 @@
EOS
opt :url, 'Github URL', type: String, default: ''
opt :branch, 'Destination branch', type: String, default: 'gh-pages'
opt :branch_from, 'Source branch', type: String, default: 'master'
opt :config, 'Deploy Config File', type: String, default: '_config-deploy.yml'
+ opt :bundle, 'Use bundle'
end
branch = opts[:branch]
branch_from = opts[:branch_from]
config = opts[:config]
fail 'branch can\'t be empty' if branch.empty?
fail 'branch-from can\'t be empty' if branch_from.empty?
fail 'config can\'t be empty' if config.empty?
url = opts[:url]
url = `git config --get remote.origin.url`.strip if url.empty?
+bundle = opts[:bundle] ? '"bundle exec"' : ''
spec = Gem::Specification.find_by_name('jgd')
root = spec.gem_dir
script = File.join(root, 'bash/deploy.sh')
fail 'deployment failed, see log above' \
- unless system("#{script} #{url} #{branch} #{branch_from} #{config}")
+ unless system("#{script} #{url} #{branch} #{branch_from} #{config} #{bundle}")