Skip to content

Instantly share code, notes, and snippets.

@shs96c
Created August 6, 2019 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shs96c/055036bdf0d5db06cf1d68d6f696321f to your computer and use it in GitHub Desktop.
Save shs96c/055036bdf0d5db06cf1d68d6f696321f to your computer and use it in GitHub Desktop.
require "rake/task"
module Bazel
class BazelTask < Rake::Task
def needed?
true
end
def invoke(*args)
puts "Invoked!"
end
end
end
module Rake::DSL
def bazel(*args, &block)
Bazel::BazelTask.define_task(*args, &block)
end
end
@shs96c
Copy link
Author

shs96c commented Aug 6, 2019

This fails when using the following in a Rakefile and ./go

desc "Build core"
bazel "//java/client/src/org/openqa/selenium:core"

with the message: Don't know how to build task '//java/client/org/openqa/selenium:core'.

On the command line with rake 12, the same code is just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment