jgd 1.5 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,7 @@ assets:
3
3
 
4
4
  release:
5
5
  script:
6
+ - "./test.sh"
6
7
  - "rm -rf *.gem"
7
8
  - "sed -i \"s/2.0-SNAPSHOT/${tag}/g\" jgd.gemspec"
8
9
  - "gem build jgd.gemspec"
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ branches:
3
+ only:
4
+ - master
5
+ install:
6
+ - bundle install
7
+ script:
8
+ - ./test.sh
9
+
data/README.md CHANGED
@@ -1,9 +1,10 @@
1
+ [![Build Status](https://travis-ci.org/yegor256/jekyll-github-deploy.svg)](https://travis-ci.org/yegor256/jekyll-github-deploy)
1
2
  [![Gem Version](https://badge.fury.io/rb/jgd.svg)](http://badge.fury.io/rb/jgd)
2
3
 
3
4
  # What is jgd ?
4
5
 
5
- If you use some plugins with you Jekyll blog, chances are you can not
6
- have you blog generated by GitHub.
6
+ If you use some plugins with your Jekyll blog, chances are you can not
7
+ have your blog generated by GitHub.
7
8
 
8
9
  This is where jekyll-github-deploy (a.k.a. jgd) comes in: it will
9
10
  automatically build your Jekyll blog and push it to your gh-pages
@@ -12,9 +12,9 @@ git clone "${URL}" "${CLONE}"
12
12
 
13
13
  echo -e "\nRegistering variables:"
14
14
  cd "${CLONE}"
15
- USER_EMAIL=$(git config --get user.email)
15
+ USER_EMAIL=$(git config --get user.email | cat)
16
16
  USER_EMAIL=${USER_EMAIL:-"jgd@teamed.io"}
17
- USER_NAME=$(git config --get user.name)
17
+ USER_NAME=$(git config --get user.name | cat)
18
18
  USER_NAME=${USER_NAME:-"jekyll-github-deploy"}
19
19
 
20
20
  VERSION=$(git describe --always --tag)
@@ -28,6 +28,11 @@ else
28
28
  jekyll build
29
29
  fi
30
30
 
31
+ if [ ! -e _site ]; then
32
+ echo -e "\nJekyll didn't generate anything in _site!"
33
+ exit -1
34
+ fi
35
+
31
36
  cp -R _site ${TEMP}
32
37
 
33
38
  echo -e "\nPreparing gh-pages branch:"
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
5
5
  s.rubygems_version = '2.2.2'
6
6
  s.required_ruby_version = '>= 1.9.3'
7
7
  s.name = 'jgd'
8
- s.version = '1.5'
8
+ s.version = '1.5.1'
9
9
  s.license = 'MIT'
10
10
  s.summary = "Jekyll Github Deploy"
11
11
  s.description = "Automated deployment of your Jekyll blog to Github Pages"
data/test.sh ADDED
@@ -0,0 +1,26 @@
1
+ #!/bin/bash
2
+ set -e
3
+ set -x
4
+
5
+ TMP=$(mktemp -d -t jgd-XXXX)
6
+
7
+ CWD=$(pwd)
8
+ git init "${TMP}"
9
+ cd "${TMP}"
10
+ echo "hello" > "test.html"
11
+ git add "test.html"
12
+ git config user.email "test@example.com"
13
+ git config user.name "Test"
14
+ git commit -am 'initial commit'
15
+ cd "${CWD}"
16
+
17
+ ./bash/deploy.sh "${TMP}"
18
+
19
+ cd "${TMP}"
20
+ git checkout gh-pages
21
+ ls -al
22
+ cat test.html | grep "hello"
23
+ cd "${CWD}"
24
+ rm -rf "${TMP}"
25
+
26
+ echo "success"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jgd
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.5'
4
+ version: 1.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -54,12 +54,14 @@ extra_rdoc_files:
54
54
  files:
55
55
  - .gitignore
56
56
  - .rultor.yml
57
+ - .travis.yml
57
58
  - Gemfile
58
59
  - LICENSE.txt
59
60
  - README.md
60
61
  - bash/deploy.sh
61
62
  - bin/jgd
62
63
  - jgd.gemspec
64
+ - test.sh
63
65
  homepage: http://github.com/yegor256/jekyll-github-deploy
64
66
  licenses:
65
67
  - MIT