File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Usage: jgd [options]
1313 opt :branch_from , 'Source branch' , type : String , default : 'master'
1414 opt :config , 'Deploy Config File' , type : String , default : '_config-deploy.yml'
1515 opt :bundle , 'Use bundle'
16+ opt :drafts , 'Generate drafts'
1617end
1718
1819branch = opts [ :branch ]
@@ -23,11 +24,12 @@ fail 'branch-from can\'t be empty' if branch_from.empty?
2324fail 'config can\'t be empty' if config . empty?
2425url = opts [ :url ]
2526url = `git config --get remote.origin.url` . strip if url . empty?
26- bundle = opts [ :bundle ] ? '"bundle exec"' : ''
27+ bundle = opts [ :bundle ] ? '"bundle exec"' : '""'
28+ drafts = opts [ :drafts ] ? '"--drafts"' : '""'
2729
2830spec = Gem ::Specification . find_by_name ( 'jgd' )
2931root = spec . gem_dir
3032script = File . join ( root , 'bash/deploy.sh' )
3133
3234fail 'deployment failed, see log above' \
33- unless system ( "#{ script } #{ url } #{ branch } #{ branch_from } #{ config } #{ bundle } " )
35+ unless system ( "#{ script } #{ url } #{ branch } #{ branch_from } #{ config } #{ bundle } #{ drafts } " )
You can’t perform that action at this time.
0 commit comments