File: Rakefile

package info (click to toggle)
ruby-ast 2.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 144 kB
  • sloc: ruby: 423; makefile: 7
file content (21 lines) | stat: -rw-r--r-- 615 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'bundler/gem_tasks'
require 'bundler/setup'
require 'rspec/core'
require 'rspec/core/rake_task'

task :default => :spec

desc "Run test suite"
RSpec::Core::RakeTask.new(:spec) do |t|
  t.verbose = true
end

PAGES_REPO = 'git@github.com:whitequark/ast'

desc "Build and deploy documentation to GitHub pages"
task :pages do
  system "git clone #{PAGES_REPO} gh-temp/ -b gh-pages; rm gh-temp/* -rf; touch gh-temp/.nojekyll" or abort
  system "yardoc -o gh-temp/;" or abort
  system "cd gh-temp/; git add -A; git commit -m 'Updated pages.'; git push -f origin gh-pages" or abort
  FileUtils.rm_rf 'gh-temp'
end