jgd 1.6.5 → 1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/PUZZLES.md +4 -0
- data/README.md +3 -0
- data/bash/deploy.sh +7 -6
- data/bin/jgd +5 -1
- data/jgd.gemspec +1 -1
- data/test.sh +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2746011547d314c9eb9ca0ceead02fe89b7321fc
|
4
|
+
data.tar.gz: 71e749e84a0ca6b58bc162489510a191e9b3fd8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72bb759837a1209ae6fb3da1256f1f2583df4aec15e53b98921c97b1a57c542caca9864211c6696a94ab76f1cce54370c650b9377206b85be8d6c1aeddca74ec
|
7
|
+
data.tar.gz: fdf0242a835f90037a128d5410aeb3e18684e951725653da2bfd444240ee25f94fb2d91b7a591b05b0fc9e6efc5186d485df82e6c13bf9d4d65acc6c1a4b4949
|
data/PUZZLES.md
ADDED
data/README.md
CHANGED
data/bash/deploy.sh
CHANGED
@@ -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
|
41
|
-
if [ -z "$(git branch -a | grep origin
|
42
|
-
git checkout --orphan
|
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
|
45
|
+
git checkout "${BRANCH}"
|
45
46
|
fi
|
46
47
|
|
47
|
-
echo -e "\nDeploying into
|
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
|
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'
|
24
|
+
fail 'deployment failed, see log above' \
|
25
|
+
unless system("#{script} #{url} #{branch}")
|
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.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
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.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-
|
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
|