Sha256: d10aa8c53379947bc3c5f7baad278225dd8154905a9251b25322d58f8760d658
Contents?: true
Size: 1.49 KB
Versions: 9
Compression:
Stored size: 1.49 KB
Contents
# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true $stdout.sync = true require 'bundler/gem_tasks' require 'rspec/core/rake_task' require 'rake/extensiontask' load 'protobuf/tasks/compile.rake' require 'fileutils' CLOBBER << 'shared_libraries/*' Dir['ext/cs__*'].each do |extension| name = extension.split('/')[1] Rake::ExtensionTask.new name do |ext| ext.lib_dir = "lib/#{ name }" end end task :contrast_pb_compile do # do some stuff before compile # Invoke the protobuf compile task with your sensible defaults ::Rake::Task['protobuf:compile'].invoke('lib', './agent-service-api/protobuf ./agent-service-api/protobuf/dtm.proto', 'lib/contrast/api', nil) ::Rake::Task['protobuf:compile'].reenable ::Rake::Task['protobuf:compile'].invoke('lib', './agent-service-api/protobuf ./agent-service-api/protobuf/settings.proto', 'lib/contrast/api', nil) ['dtm.pb.rb', 'settings.pb.rb'].each do |target_file| target_path = File.absolute_path(File.join(__dir__, "./lib/contrast/api/#{ target_file }")) unless File.exist?(target_path) puts "File not found #{ target_path }" exit 1 end end puts 'Protobuf copied successfully' end
Version data entries
9 entries across 9 versions & 1 rubygems