require_relative "../../lib/makit" #require "makit" task :setup do # setup the protoc environment Makit::Protoc::setup # copy the makit.v1.proto file to the current directory FileUtils.cp(File.join("../../lib/makit/v1", "makit.v1.proto"), ".") # create the artifacts directory FileUtils.mkdir_p("artifacts") unless Dir.exist?("artifacts") end task :generate => [:setup] do puts ":generate".colorize(:blue) puts " generating code from makit.v1.proto".colorize(:green) "protoc -I . --ruby_out=artifacts makit.v1.proto".run #"grpc_tools_ruby_protoc -I . --ruby_out=artifacts --grpc_out=artifacts makit.v1.proto".run end task :test do runner = Makit::CommandRunner.new command = runner.run(runner.parse_command_request("git --version")) puts "command type: #{command.class}" puts "command proto name: #{command.name}" end task :default => [:setup, :generate]