wax_tasks 0.0.45 → 0.0.46
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 +4 -4
- data/lib/tasks/push_gh.rake +42 -0
- data/lib/tasks/push_s3.rake +31 -0
- metadata +4 -4
- data/lib/tasks/ghbranch.rake +0 -34
- data/lib/tasks/s3branch.rake +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08373f20a96f8beb7d8da2f0080874f53434ca22946e978f1810341f8b0d0789'
|
4
|
+
data.tar.gz: d519743109cc40019c40b2ff0cb53165c9f35e7b8e37ba3bf849a64b240157bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 336d3b60f04a17515e95d55d2787ef8243b9bdbbc634ff52ede4e64745269e54149995e7df8bf586a035c074136c195c3d5484a0052028a20d1b0a19fb872150
|
7
|
+
data.tar.gz: 7576e0dd98d98ef35b3b89c1908969553e9edd0905d06f92610e16bd5ee886d569e6ede8e0e4f1eb92cd9c0cf69e59834d88123a6294ed6538d68a9a42b72127
|
@@ -0,0 +1,42 @@
|
|
1
|
+
include FileUtils
|
2
|
+
require 'wax_tasks'
|
3
|
+
require 'jekyll'
|
4
|
+
|
5
|
+
namespace :wax do
|
6
|
+
namespace :push do
|
7
|
+
desc 'build site with gh-baseurl and push to gh-pages branch'
|
8
|
+
task :gh do
|
9
|
+
if ENV['CI']
|
10
|
+
REPO_SLUG = ENV['TRAVIS_REPO_SLUG']
|
11
|
+
USER = REPO_SLUG.split("/")[0]
|
12
|
+
TOKEN = ENV['ACCESS_TOKEN']
|
13
|
+
COMMIT_MSG = "Site updated via #{ENV['TRAVIS_COMMIT']}".freeze
|
14
|
+
ORIGIN = "https://#{USER}:#{TOKEN}@github.com/#{REPO_SLUG}.git".freeze
|
15
|
+
puts "Deploying to gh-oages branch from Travis as #{USER}"
|
16
|
+
else
|
17
|
+
ORIGIN = `git config --get remote.origin.url`.freeze
|
18
|
+
COMMIT_MSG = "Site updated at #{Time.now.utc}".freeze
|
19
|
+
puts "Deploying to gh-pages branch from local task"
|
20
|
+
end
|
21
|
+
config = read_config
|
22
|
+
rm_rf('_site')
|
23
|
+
|
24
|
+
opts = {
|
25
|
+
'source' => '.',
|
26
|
+
'destination' => '_site',
|
27
|
+
'config' => '_config.yml',
|
28
|
+
'baseurl' => config['gh-baseurl']
|
29
|
+
}
|
30
|
+
|
31
|
+
Jekyll::Site.new(Jekyll.configuration(opts)).process
|
32
|
+
Dir.mktmpdir do |tmp|
|
33
|
+
cp_r '_site/.', tmp
|
34
|
+
Dir.chdir tmp
|
35
|
+
system 'git init'
|
36
|
+
system "git add . && git commit -m '#{COMMIT_MSG}'"
|
37
|
+
system 'git remote add origin ' + ORIGIN
|
38
|
+
system 'git push origin master:refs/heads/gh-pages --force'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
include FileUtils
|
2
|
+
require 'wax_tasks'
|
3
|
+
|
4
|
+
namespace :wax do
|
5
|
+
namespace :push do
|
6
|
+
desc 'push built site to s3 branch'
|
7
|
+
task :s3 do
|
8
|
+
if ENV['CI']
|
9
|
+
REPO_SLUG = ENV['TRAVIS_REPO_SLUG']
|
10
|
+
USER = REPO_SLUG.split("/")[0]
|
11
|
+
TOKEN = ENV['ACCESS_TOKEN']
|
12
|
+
COMMIT_MSG = "Site updated via #{ENV['TRAVIS_COMMIT']}".freeze
|
13
|
+
ORIGIN = "https://#{USER}:#{TOKEN}@github.com/#{REPO_SLUG}.git".freeze
|
14
|
+
puts "Deploying to s3 branch from Travis as #{USER}"
|
15
|
+
else
|
16
|
+
ORIGIN = `git config --get remote.origin.url`.freeze
|
17
|
+
COMMIT_MSG = "Site updated at #{Time.now.utc}".freeze
|
18
|
+
puts "Deploying to s3 branch from local task"
|
19
|
+
end
|
20
|
+
|
21
|
+
Dir.mktmpdir do |tmp|
|
22
|
+
cp_r '_site/.', tmp
|
23
|
+
Dir.chdir tmp
|
24
|
+
system 'git init'
|
25
|
+
system "git add . && git commit -m '#{COMMIT_MSG}'"
|
26
|
+
system 'git remote add origin ' + ORIGIN
|
27
|
+
system 'git push origin master:refs/heads/s3 --force'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wax_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.46
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marii Nyrop
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -144,12 +144,12 @@ extensions: []
|
|
144
144
|
extra_rdoc_files: []
|
145
145
|
files:
|
146
146
|
- Gemfile
|
147
|
-
- lib/tasks/ghbranch.rake
|
148
147
|
- lib/tasks/iiif.rake
|
149
148
|
- lib/tasks/jspackage.rake
|
150
149
|
- lib/tasks/lunr.rake
|
151
150
|
- lib/tasks/pagemaster.rake
|
152
|
-
- lib/tasks/
|
151
|
+
- lib/tasks/push_gh.rake
|
152
|
+
- lib/tasks/push_s3.rake
|
153
153
|
- lib/tasks/test.rake
|
154
154
|
- lib/wax_tasks.rb
|
155
155
|
- lib/wax_tasks/collection.rb
|
data/lib/tasks/ghbranch.rake
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
include FileUtils
|
2
|
-
require 'wax_tasks'
|
3
|
-
require 'jekyll'
|
4
|
-
|
5
|
-
namespace :wax do
|
6
|
-
desc 'build site with gh-baseurl and publish to gh-pages branch'
|
7
|
-
task :ghbranch do
|
8
|
-
config = read_config
|
9
|
-
rm_rf('_site')
|
10
|
-
|
11
|
-
opts = {
|
12
|
-
'source' => '.',
|
13
|
-
'destination' => '_site',
|
14
|
-
'config' => '_config.yml',
|
15
|
-
'baseurl' => config['gh-baseurl'],
|
16
|
-
'incremental' => true,
|
17
|
-
'verbose' => true
|
18
|
-
}
|
19
|
-
|
20
|
-
Jekyll::Site.new(Jekyll.configuration(opts)).process
|
21
|
-
|
22
|
-
origin = `git config --get remote.origin.url`
|
23
|
-
|
24
|
-
Dir.mktmpdir do |tmp|
|
25
|
-
cp_r '_site/.', tmp
|
26
|
-
Dir.chdir tmp
|
27
|
-
|
28
|
-
system 'git init' # Init the repo.
|
29
|
-
system "git add . && git commit -m 'Site updated at #{Time.now.utc}'"
|
30
|
-
system 'git remote add origin ' + origin
|
31
|
-
system 'git push origin master:refs/heads/gh-pages --force'
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
data/lib/tasks/s3branch.rake
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
include FileUtils
|
2
|
-
require 'wax_tasks'
|
3
|
-
require 'jekyll'
|
4
|
-
|
5
|
-
namespace :wax do
|
6
|
-
desc 'build site with baseurl and publish to s3 branch'
|
7
|
-
task :s3branch do
|
8
|
-
origin = `git config --get remote.origin.url`
|
9
|
-
Dir.mktmpdir do |tmp|
|
10
|
-
cp_r '_site/.', tmp
|
11
|
-
Dir.chdir tmp
|
12
|
-
system 'git init' # Init the repo.
|
13
|
-
system "git add . && git commit -m 'Site updated at #{Time.now.utc}'"
|
14
|
-
system 'git remote add origin ' + origin
|
15
|
-
system 'git push origin master:refs/heads/s3 --force'
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|