-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
21 lines (15 loc) · 664 Bytes
/
Rakefile
File metadata and controls
21 lines (15 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require "bundler/gem_tasks"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
PROTO_FILE_NAME = "ql2.proto"
PROTO_FILE_URL = "https://raw.githubusercontent.com/RethinkDB/rethinkdb/80b4c72a564230bccc761183ef27bca00fe9a012/src/rdb_protocol/#{PROTO_FILE_NAME}"
PROTO_RB_FILE = "../lib/ql2.pb.rb"
desc "Downloads the latest RDB protocol protobufs and generates its API"
task :protobuf do
mkdir_p "protobuf"
cd "protobuf"
`curl -o #{PROTO_FILE_NAME} #{PROTO_FILE_URL}`
`python ../scripts/convert_protofile.py --language ruby --input-file #{PROTO_FILE_NAME} --output-file #{PROTO_RB_FILE}`
end
task :build => :protobuf