-
Notifications
You must be signed in to change notification settings - Fork 275
/
Rakefile
46 lines (41 loc) · 947 Bytes
/
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
require "bundler/gem_tasks"
require "rake/testtask"
require "rdoc/task"
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList["test/**/*_test.rb"]
t.warning = false
end
task default: :test
RDoc::Task.new do |t|
t.rdoc_dir = "website/build/rdoc"
t.options += [
"--line-numbers",
"--title", "Shrine: Toolkit for file uploads",
"--markup", "markdown",
"--format", "hanna",
"--main", "README.md",
"--visibility", "public",
]
t.rdoc_files.add Dir[
"README.md",
"CHANGELOG.md",
"lib/**/*.rb",
"doc/*.md",
"doc/release_notes/*.md",
]
end
namespace :website do
task :publish => :build do
sh "git switch gh-pages"
sh "cp -R website/build/* ."
sh "git add --all"
sh "git commit -m 'Update website'"
sh "git push origin gh-pages"
sh "git switch master"
end
task :build do
sh "yarn build", chdir: "website"
Rake::Task["rdoc"].invoke
end
end