forked from Flaez/acceptbitcoincash-staging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
61 lines (54 loc) · 1.37 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
require 'html-proofer'
require 'rubocop/rake_task'
require 'jekyll'
task default: %w[proof verify rubocop]
task :build do
config = Jekyll.configuration(
'source' => './',
'destination' => './_site'
)
site = Jekyll::Site.new(config)
Jekyll::Commands::Build.build site, config
end
task proof: 'build' do
HTMLProofer.check_directory(
'./_site', \
assume_extension: true, \
check_html: true, \
disable_external: true, \
log_level: 'debug', \
url_ignore: ['/add'], \
verbose: true
).run
end
task proof_external: 'build' do
HTMLProofer.check_directory(
'./_site', \
assume_extension: true, \
check_html: true, \
external_only: false, \
verbose: true, \
log_level: 'info', \
url_ignore: ['/add'], \
http_status_ignore: [0, 301, 302, 403, 503], \
cache: { timeframe: '1w' }, \
hydra: { max_concurrency: 12 }
).run
end
namespace :docker do
desc "build docker images"
task :build do
puts "Generating stats (HTML partial) of websites supporting Bitcoin Cash"
Dir.chdir(File.join('.', 'scripts', 'python')) do
puts `python ./bchAccepted.py`
end
puts "Generating static files for nginx"
puts `bundle exec jekyll build`
puts "Building acceptbitcoincash docker image"
puts `docker build -t acceptbitcoincash/acceptbitcoincash .`
end
end
task :verify do
ruby './verify.rb'
end
RuboCop::RakeTask.new