rake is Makefile for ruby world. I am not big fan of Ruby but I like Rake as a task execuion library.
task defintion & dependency
1 | task :A do |
find directory where rake is invoked.
sometimes, maven or gradle build command should be executed at project root directory. but current directory is changed by Rake where the Rakefile is located. so build command would fail by that reason. in this case we can get the origial directory by using the following Ruby APIs.
1 | dir = Rake.application.original_dir |