Skip to content

Commit

Permalink
Add local rake task for regenerating the example code
Browse files Browse the repository at this point in the history
Rather than having to try and remember or look up the command to run code generation for the example, hit the easy button and create a simple rake task for it.
  • Loading branch information
darronschall committed May 24, 2024
1 parent 0076459 commit a87b6cb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tasks/twirp_protoc_plugin.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

require "rake"

desc "Re-runs code generation for the example using local plugin code."
task :example do
%x(protoc --plugin=protoc-gen-twirp_ruby=./exe/protoc-gen-twirp_ruby \
--ruby_out=. \
--twirp_ruby_out=. \
./example/hello_world.proto
)
end

0 comments on commit a87b6cb

Please sign in to comment.