-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
39 lines (31 loc) · 863 Bytes
/
Rakefile
File metadata and controls
39 lines (31 loc) · 863 Bytes
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
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "yard"
RSpec::Core::RakeTask.new(:spec)
desc "Run all tests"
task default: :spec
desc "Build the gem"
task build: :gemspec do
system "gem build rails_accessibility_testing.gemspec"
end
desc "Generate YARD documentation"
YARD::Rake::YardocTask.new do |t|
t.files = ["lib/**/*.rb"]
t.options = ["--no-private"]
end
desc "Clean build artifacts"
task :clean do
rm_f "*.gem"
rm_rf "pkg"
rm_rf ".yardoc"
rm_rf "doc"
end
desc "Release the gem"
task :release, [:version] => [:clean, :build, :spec] do |_t, args|
version = args[:version] || ENV["VERSION"]
raise "Version required" unless version
sh "git tag -a v#{version} -m 'Release v#{version}'"
sh "git push origin v#{version}"
sh "gem push rails_accessibility_testing-#{version}.gem"
end