Rakefile
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 31 May 2016 08:25:09 +0100
changeset 40 f75898c6595d
parent 24 ae6fc15070e4
child 68 61d8bee7c4d4
permissions -rw-r--r--
Debugging support * added new rake target 'shell' which loads a project and then starts an interactive session (using 'pry' package) * Added `halt()` method that starts an interactive pry-based debugger at the point `halt()` was called. Like `self halt` in Smalltalk.

$:.push('.')
require 'rakelib/support.rb'

import 'rakelib/info.rake'
import 'rakelib/setup.rake'
import 'rakelib/checkout.rake'
import 'rakelib/compile.rake'
import 'rakelib/test.rake'
import 'rakelib/install.rake'
import 'rakelib/dist-jv.rake'
import 'rakelib/clean.rake'

desc "Fetch sources and compiles project (default task)"
task :'default' => [ :'setup', :'checkout', :'compile' ]

task :'pre'

task :'post'                  

task :'jenkins:job' => [ :'setup', :'checkout', :'update', :'compile', :'test', :'lint', :'artifacts' ]

desc "Run interactive Ruby shell with project loaded and all tasks defined"
task :'shell' => [:'setup' ] do 
  begin
    require 'pry'
    begin
      require 'pry-byebug'
    rescue LoadError
      warn("`pry-byebug` not installed, run `gem install pry-byebug` to install it")
    end
    binding.pry
  rescue LoadError 
    error("`pry` not installed, run `gem install pry` to install it")
  end
end