-
Notifications
You must be signed in to change notification settings - Fork 6
/
Rakefile
53 lines (40 loc) · 1.19 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
=begin
This file is part of the Arachni::Reactor project and may be subject to
redistribution and commercial restrictions. Please see the Arachni::Reactor
web site for more information on licensing and terms of use.
=end
require 'rubygems'
require File.expand_path( File.dirname( __FILE__ ) ) + '/lib/arachni/reactor/version'
begin
require 'rspec'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
rescue
end
task default: [ :build, :spec ]
desc 'Generate docs'
task :docs do
outdir = '../arachni-reactor-docs'
sh "rm -rf #{outdir}"
sh "mkdir -p #{outdir}"
sh "yardoc -o #{outdir}"
sh 'rm -rf .yardoc'
end
desc 'Clean up'
task :clean do
sh 'rm *.gem || true'
end
desc 'Build the gem.'
task build: [ :clean ] do
sh "gem build arachni-reactor.gemspec"
end
desc 'Build and install the gem.'
task install: [ :build ] do
sh "gem install arachni-reactor-#{Arachni::Reactor::VERSION}.gem"
end
desc 'Push a new version to Rubygems'
task publish: [ :build ] do
sh "git tag -a v#{Arachni::Reactor::VERSION} -m 'Version #{Arachni::Reactor::VERSION}'"
sh "gem push arachni-reactor-#{Arachni::Reactor::VERSION}.gem"
end
task release: [ :publish ]