jgd 1.10 → 1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/bash/deploy.sh +3 -2
- data/bin/jgd +4 -2
- data/jgd.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d8d5b1a894f6200e2efea31c1e2d014d2657004
|
4
|
+
data.tar.gz: cf06325c16808caedf1c3745279f1efd1c9e3ce9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8b892544e6391d1113bdde86400c44d20f4dfac28ab64109911da1d0a36c4239b709a7ed18b1d509cd119d36a522e50cc985c6223b4772a98e7da048bb95a08
|
7
|
+
data.tar.gz: f00d52afd2fce723b5aec908fcf3b7a0ef88d693fe729f720b19e238da4e77200a94a875b683c36d7c6e57a1ce30daf966c5e7c554cede632981d47eebab2ed6
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![
|
1
|
+
[![Managed by Zerocracy](http://www.zerocracy.com/badge.svg)](http://www.zerocracy.com)
|
2
2
|
[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/jekyll-github-deploy)](http://www.rultor.com/p/yegor256/jekyll-github-deploy)
|
3
3
|
[![We recommend RubyMine](http://img.teamed.io/rubymine-recommend.svg)](https://www.jetbrains.com/ruby/)
|
4
4
|
|
@@ -34,7 +34,7 @@ jgd
|
|
34
34
|
|
35
35
|
Now your site is deployed to `gh-pages` branch of your repo. Done.
|
36
36
|
|
37
|
-
##
|
37
|
+
## Command Line Options
|
38
38
|
|
39
39
|
Below is a list of all command line options.
|
40
40
|
|
@@ -44,6 +44,7 @@ Below is a list of all command line options.
|
|
44
44
|
| `-b` or `--branch` | The branch to push your site to. Defaults to `gh-pages`. If the branch does not exist, it will be created. |
|
45
45
|
| `-r` or `--branch-from` | The source branch. Defaults to `master`. |
|
46
46
|
| `-c` or `--config` | Name of the optional deploy config file. See [Production variables](#production-variables) below for more information. |
|
47
|
+
| `-d` or `--drafts` | Adds the `--drafts` option to Jekyll so that it will build draft posts. |
|
47
48
|
| `-h` or `--help` | Displays a list of all options. |
|
48
49
|
|
49
50
|
## Production variables
|
data/bash/deploy.sh
CHANGED
@@ -8,6 +8,7 @@ BRANCH=$2
|
|
8
8
|
BRANCH_FROM=$3
|
9
9
|
DEPLOY_CONFIG=$4
|
10
10
|
BUNDLE=$5
|
11
|
+
DRAFTS=$6
|
11
12
|
SRC=$(pwd)
|
12
13
|
TEMP=$(mktemp -d -t jgd-XXX)
|
13
14
|
trap "rm -rf ${TEMP}" EXIT
|
@@ -24,9 +25,9 @@ echo -e "\nBuilding Jekyll site:"
|
|
24
25
|
rm -rf _site
|
25
26
|
|
26
27
|
if [ -r ${DEPLOY_CONFIG} ]; then
|
27
|
-
${BUNDLE} jekyll build --config _config.yml,${DEPLOY_CONFIG}
|
28
|
+
${BUNDLE} jekyll build --config _config.yml,${DEPLOY_CONFIG} ${DRAFTS}
|
28
29
|
else
|
29
|
-
${BUNDLE} jekyll build
|
30
|
+
${BUNDLE} jekyll build ${DRAFTS}
|
30
31
|
fi
|
31
32
|
|
32
33
|
if [ ! -e _site ]; then
|
data/bin/jgd
CHANGED
@@ -13,6 +13,7 @@ Usage: jgd [options]
|
|
13
13
|
opt :branch_from, 'Source branch', type: String, default: 'master'
|
14
14
|
opt :config, 'Deploy Config File', type: String, default: '_config-deploy.yml'
|
15
15
|
opt :bundle, 'Use bundle'
|
16
|
+
opt :drafts, 'Generate drafts'
|
16
17
|
end
|
17
18
|
|
18
19
|
branch = opts[:branch]
|
@@ -23,11 +24,12 @@ fail 'branch-from can\'t be empty' if branch_from.empty?
|
|
23
24
|
fail 'config can\'t be empty' if config.empty?
|
24
25
|
url = opts[:url]
|
25
26
|
url = `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"' : '""'
|
27
29
|
|
28
30
|
spec = Gem::Specification.find_by_name('jgd')
|
29
31
|
root = spec.gem_dir
|
30
32
|
script = File.join(root, 'bash/deploy.sh')
|
31
33
|
|
32
34
|
fail '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}")
|
data/jgd.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.rubygems_version = '2.2.2'
|
9
9
|
s.required_ruby_version = '>= 1.9.3'
|
10
10
|
s.name = 'jgd'
|
11
|
-
s.version = '1.
|
11
|
+
s.version = '1.11'
|
12
12
|
s.license = 'MIT'
|
13
13
|
s.summary = 'Jekyll Github Deploy'
|
14
14
|
s.description = 'Automated deployment of your Jekyll blog to Github Pages'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jgd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.11'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trollop
|