-
Notifications
You must be signed in to change notification settings - Fork 19
/
Rakefile
57 lines (44 loc) · 1.04 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
# frozen_string_literal: true
require "bundler/gem_tasks"
task default: %i[lint test]
namespace :test do
task :refresh do
sh "bin/appraisal clean"
sh "bin/appraisal generate"
end
task :all do
sh "bin/appraisal install"
sh "bin/appraisal bin/rake test"
end
end
task :test do
sh "bin/rspec"
sh "bin/yarn test"
end
task :lint do
sh "bin/standardrb"
sh "bin/yarn lint"
end
namespace :release do
task :guard_version_match do
require "json"
package_version =
JSON.parse(File.read("package.json")).fetch("version")
next if Motion::VERSION == package_version
raise "The package version and the gem version do not match!"
end
task :yarn_publish do
sh "bin/yarn publish --new-version '#{Motion::VERSION}' --access public"
end
end
# Remove Bundler's release task so we can add our own hooks
Rake::Task["release"].clear
task :release, %i[release] => %i[
lint
build
release:guard_clean
release:guard_version_match
release:source_control_push
release:yarn_publish
release:rubygem_push
]