Sha256: af6cd38d57095f9a9029048fcafdfaf0d46168253df2a7f16b1e1d616480bfb3
Contents?: true
Size: 1.54 KB
Versions: 1
Compression:
Stored size: 1.54 KB
Contents
# frozen_string_literal: true # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'bundler/gem_tasks' desc "Compile the necessary protobuf files." task :compile_protos do Rake::Task[:clean_protos].invoke FileUtils.mkdir 'lib' protos = [ "../googleapis/google/longrunning/operations.proto" ] command = [] command << "grpc_tools_ruby_protoc" command << "--grpc_out=lib" command << "-I ../googleapis" command += protos full_command = command.join " " puts full_command system full_command end desc "Test loading all proto files" task :test_loading do puts "\nLoading proto files" Dir.glob("lib/google/**/*_pb.rb") do |path| puts path require_relative path end end desc "Remove the compiled protos." task :clean_protos do FileUtils.rm_rf "lib" end desc "Run the CI build" task :ci do puts "\nCompiling Protos\n" Rake::Task[:compile_protos].invoke Rake::Task[:test_loading].invoke end Rake::Task[:build].enhance [:compile_protos] Rake::Task[:clean].enhance [:clean_protos] task default: :ci
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
googleapis-common-protos-1.3.11 | Rakefile |