Sha256: 2b6559ebb008290c0547dfb59031aba9b545a32c74df49ba64e0ee874fac567f

Contents?: true

Size: 983 Bytes

Versions: 26

Compression:

Stored size: 983 Bytes

Contents

# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

require_relative 'helpers/license'
include License

namespace :proto do
  desc 'Generate proto files'
  task :generate do
    gem_folder = File.expand_path(File.join(File.dirname(__FILE__), '..'))
    proto_filename = File.join(gem_folder, 'lib', 'new_relic', 'proto', 'infinite_tracing.proto')
    output_path = File.join(gem_folder, 'lib', 'new_relic', 'infinite_tracing', 'proto')

    FileUtils.mkdir_p(output_path)
    cmd = [
      'grpc_tools_ruby_protoc',
      "-I#{gem_folder}/lib/new_relic/proto",
      "--ruby_out=#{output_path}",
      "--grpc_out=#{output_path} #{proto_filename}"
    ].join(' ')

    if system(cmd)
      puts 'Proto file generated!'
      add_license_preamble_and_remove_requires(output_path)
    else
      puts 'Failed to generate proto file.'
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
newrelic-infinite_tracing-9.17.0 tasks/proto.rake
newrelic-infinite_tracing-9.16.1 tasks/proto.rake
newrelic-infinite_tracing-9.16.0 tasks/proto.rake
newrelic-infinite_tracing-9.15.0 tasks/proto.rake
newrelic-infinite_tracing-9.14.0 tasks/proto.rake
newrelic-infinite_tracing-9.13.0 tasks/proto.rake
newrelic-infinite_tracing-9.12.0 tasks/proto.rake
newrelic-infinite_tracing-9.11.0 tasks/proto.rake
newrelic-infinite_tracing-9.10.2 tasks/proto.rake
newrelic-infinite_tracing-9.10.1 tasks/proto.rake
newrelic-infinite_tracing-9.10.0 tasks/proto.rake
newrelic-infinite_tracing-9.9.0 tasks/proto.rake
newrelic-infinite_tracing-9.8.0 tasks/proto.rake
newrelic-infinite_tracing-9.7.1 tasks/proto.rake
newrelic-infinite_tracing-9.7.0 tasks/proto.rake
newrelic-infinite_tracing-9.6.0 tasks/proto.rake
newrelic-infinite_tracing-9.5.0 tasks/proto.rake
newrelic-infinite_tracing-9.4.2 tasks/proto.rake
newrelic-infinite_tracing-9.4.1 tasks/proto.rake
newrelic-infinite_tracing-9.4.0 tasks/proto.rake