forked from asciidoctor/asciidoctor-pdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
80 lines (69 loc) · 2.29 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# -*- encoding: utf-8 -*-
require File.expand_path('lib/asciidoctor-pdf/version', File.dirname(__FILE__))
require 'rake/clean'
default_tasks = []
begin
require 'bundler/gem_tasks'
# Enhance the release task to create an explicit commit for the release
#Rake::Task[:release].enhance [:commit_release]
# NOTE you don't need to push after updating version and committing locally
# WARNING no longer works; it's now necessary to get master in a state ready for tagging
task :commit_release do
Bundler::GemHelper.new.send :guard_clean
sh %(git commit --allow-empty -a -m 'Release #{Asciidoctor::Pdf::VERSION}')
end
rescue LoadError
end
begin
require 'rdoc/task'
Rake::RDocTask.new do |t|
t.rdoc_dir = 'rdoc'
t.title = %(Asciidoctor PDF #{Asciidoctor::Pdf::VERSION})
t.main = %(README.adoc)
t.rdoc_files.include 'README.adoc', 'LICENSE.adoc', 'NOTICE.adoc', 'lib/**/*.rb', 'bin/**/*'
end
rescue LoadError
end
=begin NOT CURRENTLY IN USE
begin
require 'rake/testtask'
Rake::TestTask.new do |t|
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
t.warning = true
if RUBY_VERSION >= '2'
t.options = '--tty=no'
end
end
default_tasks << :test
rescue LoadError
end
begin
require 'cucumber'
require 'cucumber/rake/task'
CUKE_RESULTS_FILE = 'feature-results.html'
ARUBA_TMP_DIR = 'tmp'
CLEAN << CUKE_RESULTS_FILE if File.file? CUKE_RESULTS_FILE
CLEAN << ARUBA_TMP_DIR if File.directory? ARUBA_TMP_DIR
desc 'Run features'
Cucumber::Rake::Task.new :features do |t|
opts = %(features --format html -o #{CUKE_RESULTS_FILE} --format progress -x --tags ~@pending)
opts = %(#{opts} --tags #{ENV['TAGS']}) if ENV['TAGS']
t.cucumber_opts = opts
t.fork = false
end
desc 'Run features tagged as work-in-progress (@wip)'
Cucumber::Rake::Task.new 'features:wip' do |t|
#t.cucumber_opts = %(features --format html -o #{CUKE_RESULTS_FILE} --format pretty -x -s --tags @wip)
t.cucumber_opts = %(features --format html -o #{CUKE_RESULTS_FILE} --format progress -x --tags @wip)
t.fork = false
end
default_tasks << :features
task :cucumber => :features
task 'cucumber:wip' => 'features:wip'
task :wip => 'features:wip'
rescue LoadError
end
=end
task :default => default_tasks unless default_tasks.empty?