From 80c9f6d14c4c879e21f4bf01367a753d96cb335d Mon Sep 17 00:00:00 2001 From: dwest15 Date: Sat, 5 Aug 2017 06:28:22 -0400 Subject: [PATCH 1/4] Fix typo in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ae7e4d9..b184773 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ jgd Now your site is deployed to `gh-pages` branch of your repo. Done. -## Comand Line Options +## Command Line Options Below is a list of all command line options. From 0db8b7a49cf1edc1096fe71c4e93c8613fa0b9dd Mon Sep 17 00:00:00 2001 From: dwest15 Date: Sat, 5 Aug 2017 06:29:41 -0400 Subject: [PATCH 2/4] =?UTF-8?q?Add=20=E2=80=94drafts=20and=20pass=20as=206?= =?UTF-8?q?th=20param=20to=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/jgd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/jgd b/bin/jgd index ae7311b..b9473a3 100755 --- a/bin/jgd +++ b/bin/jgd @@ -13,6 +13,7 @@ Usage: jgd [options] opt :branch_from, 'Source branch', type: String, default: 'master' opt :config, 'Deploy Config File', type: String, default: '_config-deploy.yml' opt :bundle, 'Use bundle' + opt :drafts, 'Generate drafts' end branch = opts[:branch] @@ -23,11 +24,12 @@ 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"' : '' +bundle = opts[:bundle] ? '"bundle exec"' : '""' +drafts = opts[:drafts] ? '"--drafts"' : '""' 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} #{bundle}") + unless system("#{script} #{url} #{branch} #{branch_from} #{config} #{bundle} #{drafts}") From c587ca4216b53c507aefac6f73e23b2bb432b364 Mon Sep 17 00:00:00 2001 From: dwest15 Date: Sat, 5 Aug 2017 06:30:19 -0400 Subject: [PATCH 3/4] Add 6th param to jekyll build command --- bash/deploy.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bash/deploy.sh b/bash/deploy.sh index a84c5e1..31f075d 100755 --- a/bash/deploy.sh +++ b/bash/deploy.sh @@ -8,6 +8,7 @@ BRANCH=$2 BRANCH_FROM=$3 DEPLOY_CONFIG=$4 BUNDLE=$5 +DRAFTS=$6 SRC=$(pwd) TEMP=$(mktemp -d -t jgd-XXX) trap "rm -rf ${TEMP}" EXIT @@ -24,9 +25,9 @@ echo -e "\nBuilding Jekyll site:" rm -rf _site if [ -r ${DEPLOY_CONFIG} ]; then - ${BUNDLE} jekyll build --config _config.yml,${DEPLOY_CONFIG} + ${BUNDLE} jekyll build --config _config.yml,${DEPLOY_CONFIG} ${DRAFTS} else - ${BUNDLE} jekyll build + ${BUNDLE} jekyll build ${DRAFTS} fi if [ ! -e _site ]; then From c5bdd85c91aea142be499241b1e1888eabcae328 Mon Sep 17 00:00:00 2001 From: dwest15 Date: Sat, 5 Aug 2017 12:31:56 -0400 Subject: [PATCH 4/4] =?UTF-8?q?Update=20readme=20with=20=E2=80=94drafts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b184773..23a21bd 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Below is a list of all command line options. | `-b` or `--branch` | The branch to push your site to. Defaults to `gh-pages`. If the branch does not exist, it will be created. | | `-r` or `--branch-from` | The source branch. Defaults to `master`. | | `-c` or `--config` | Name of the optional deploy config file. See [Production variables](#production-variables) below for more information. | +| `-d` or `--drafts` | Adds the `--drafts` option to Jekyll so that it will build draft posts. | | `-h` or `--help` | Displays a list of all options. | ## Production variables