mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2026-10-12 17:58:00 +08:00
* Replace protobuf 2.6.1 with 3.21.8 * Update/add protobuf libs * Add CS2 protos * Remove old csgo/dota protos * Add versioned protoc bin * Comment out Valve's `schema` define for now * Use ENetworkDisconnectionReason * Fix-up `offsetof` to avoid errors on some Clang versions
26 lines
634 B
Ruby
26 lines
634 B
Ruby
require "rake/testtask"
|
|
|
|
# Proto for tests.
|
|
genproto_output = []
|
|
genproto_output << "tests/generated_code.rb"
|
|
genproto_output << "tests/test_import.rb"
|
|
file "tests/generated_code.rb" => "tests/generated_code.proto" do |file_task|
|
|
sh "./protoc --ruby_out=. tests/generated_code.proto"
|
|
end
|
|
|
|
file "tests/test_import.rb" => "tests/test_import.proto" do |file_task|
|
|
sh "./protoc --ruby_out=. tests/test_import.proto"
|
|
end
|
|
|
|
task :genproto => genproto_output
|
|
|
|
task :clean do
|
|
sh "rm -f #{genproto_output.join(' ')}"
|
|
end
|
|
|
|
Rake::TestTask.new(:test => :genproto) do |t|
|
|
t.test_files = FileList["tests/*.rb"]
|
|
end
|
|
|
|
task :default => [:test]
|