Sha256: c888aac045c23dfe07064e846ca9096c211ddbc837511243fe2ab7c50b35649d
Contents?: true
Size: 1.53 KB
Versions: 4
Compression:
Stored size: 1.53 KB
Contents
# Copyright (c) 2022 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 desc 'compile the protobuf files for the agent, translating them to .rb classes' 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
contrast-agent-6.3.0 | Rakefile |
contrast-agent-6.2.0 | Rakefile |
contrast-agent-6.1.2 | Rakefile |
contrast-agent-6.1.1 | Rakefile |