jgd 1.6.5 → 1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5389f16dd5f6eaf57d48366dfe796b2466aa329
4
- data.tar.gz: 78ca6c5a5196bcac4f0d77e81802701f6f47f895
3
+ metadata.gz: 2746011547d314c9eb9ca0ceead02fe89b7321fc
4
+ data.tar.gz: 71e749e84a0ca6b58bc162489510a191e9b3fd8d
5
5
  SHA512:
6
- metadata.gz: 92f7b1788800852350a015625f4759a3b184bf6f411f08ee886876e6e61733024c3252d7ce934cfef4b9b43e47ae5d7f0061aa487e6f214f0784e4deadc274b1
7
- data.tar.gz: e5ff1cb25ce7874ed1edf2fc46bf0496b928e19b85baa2e9bf3b22677515ccb0b9cacc7f083733d9e35bbee2652750cac5b3466c6055025e278677e70cea2174
6
+ metadata.gz: 72bb759837a1209ae6fb3da1256f1f2583df4aec15e53b98921c97b1a57c542caca9864211c6696a94ab76f1cce54370c650b9377206b85be8d6c1aeddca74ec
7
+ data.tar.gz: fdf0242a835f90037a128d5410aeb3e18684e951725653da2bfd444240ee25f94fb2d91b7a591b05b0fc9e6efc5186d485df82e6c13bf9d4d65acc6c1a4b4949
@@ -0,0 +1,4 @@
1
+ ## Puzzles
2
+
3
+ There are 0 active puzzles (0 total):
4
+
data/README.md CHANGED
@@ -80,3 +80,6 @@ script:
80
80
  ```
81
81
 
82
82
  Read also [this article](http://www.yegor256.com/2014/06/22/jekyll-github-deploy.html).
83
+
84
+ PS. You can also specify target branch, with is `gh-pages` by default. Use
85
+ `--branch` command line option.
@@ -4,6 +4,7 @@ set -e
4
4
  set -o pipefail
5
5
 
6
6
  URL=$1
7
+ BRANCH=$2
7
8
  SRC=$(pwd)
8
9
  TEMP=$(mktemp -d -t jgd-XXX)
9
10
  trap "rm -rf ${TEMP}" EXIT
@@ -37,20 +38,20 @@ rm -rf ${CLONE}
37
38
  mv ${COPY} ${CLONE}
38
39
  cd ${CLONE}
39
40
 
40
- echo -e "\nPreparing gh-pages branch:"
41
- if [ -z "$(git branch -a | grep origin/gh-pages)" ]; then
42
- git checkout --orphan gh-pages
41
+ echo -e "\nPreparing ${BRANCH} branch:"
42
+ if [ -z "$(git branch -a | grep origin/${BRANCH})" ]; then
43
+ git checkout --orphan "${BRANCH}"
43
44
  else
44
- git checkout gh-pages
45
+ git checkout "${BRANCH}"
45
46
  fi
46
47
 
47
- echo -e "\nDeploying into gh-pages branch:"
48
+ echo -e "\nDeploying into ${BRANCH} branch:"
48
49
  rm -rf *
49
50
  cp -R ${TEMP}/_site/* .
50
51
  rm -f README.md
51
52
  git add .
52
53
  git commit -am "new version $(date)" --allow-empty
53
- git push origin gh-pages 2>&1 | sed 's|'$URL'|[skipped]|g'
54
+ git push origin ${BRANCH} 2>&1 | sed 's|'$URL'|[skipped]|g'
54
55
 
55
56
  echo -e "\nCleaning up:"
56
57
  rm -rf "${CLONE}"
data/bin/jgd CHANGED
@@ -9,8 +9,11 @@ jgd is an automated deployer of Jekyll site to Github Pages
9
9
  Usage: jgd [options]
10
10
  EOS
11
11
  opt :url, 'Github URL', type: String, default: ''
12
+ opt :branch, 'Destination branch', type: String, default: 'gh-pages'
12
13
  end
13
14
 
15
+ branch = opts[:branch]
16
+ fail 'branch can\'t be empty' if branch.empty?
14
17
  url = opts[:url]
15
18
  url = `git config --get remote.origin.url` if url.empty?
16
19
 
@@ -18,4 +21,5 @@ spec = Gem::Specification.find_by_name('jgd')
18
21
  root = spec.gem_dir
19
22
  script = File.join(root, 'bash/deploy.sh')
20
23
 
21
- fail 'deployment failed, see log above' unless system("#{script} #{url}")
24
+ fail 'deployment failed, see log above' \
25
+ unless system("#{script} #{url} #{branch}")
@@ -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.6.5'
11
+ s.version = '1.7'
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'
data/test.sh CHANGED
@@ -14,7 +14,7 @@ git config user.name "Test"
14
14
  git commit -am 'initial commit'
15
15
  cd "${CWD}"
16
16
 
17
- ./bash/deploy.sh "${TMP}"
17
+ ./bash/deploy.sh "${TMP}" gh-pages
18
18
 
19
19
  cd "${TMP}"
20
20
  git checkout gh-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.6.5
4
+ version: '1.7'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-07 00:00:00.000000000 Z
11
+ date: 2015-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop
@@ -137,6 +137,7 @@ files:
137
137
  - ".travis.yml"
138
138
  - Gemfile
139
139
  - LICENSE.txt
140
+ - PUZZLES.md
140
141
  - README.md
141
142
  - Rakefile
142
143
  - TEAM.md