GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — async-profiler/scripts/update-otlp-classes.sh at jonoffcpu-dev · jonoffcpu/async-profiler

Expand file tree

/

update-otlp-classes.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
33 lines (30 loc) · 1.62 KB
/

update-otlp-classes.sh

Copy path

File metadata and controls

33 lines (30 loc) · 1.62 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
# Copyright The async-profiler authors
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
function main() {
local java_target otel_version pb_tag pb_java_version tmp_dir
otel_version=$(gh api repos/open-telemetry/opentelemetry-proto/releases/latest --jq .tag_name)
pb_tag=$(gh release view --repo protocolbuffers/protobuf --json tagName --jq .tagName)
pb_java_version="4.${pb_tag#v}"
tmp_dir="$(mktemp -d)"
java_target="$(grep '^JAVA_TARGET=' Makefile | cut -d= -f2)"
mkdir -p test/deps
mkdir -p "${tmp_dir}"/gen/java "${tmp_dir}"/build test/gen
curl -fL -o "test/deps/protobuf-java-${pb_java_version}.jar" \
"https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/${pb_java_version}/protobuf-java-${pb_java_version}.jar"
git -c advice.detachedHead=false clone --depth 1 --branch "${otel_version}" https://github.com/open-telemetry/opentelemetry-proto.git "${tmp_dir}/otel"
(
cd "${tmp_dir}/otel"
# protoc will break if the results of this `find` are not split
# shellcheck disable=SC2046
protoc --java_out="${tmp_dir}"/gen/java \
$(find . -type f -name '*.proto' -not \( -name 'logs*.proto' -o -name 'metrics*.proto' -o -name 'trace*.proto' -o -name '*service.proto' \))
)
# javac will break if the results of this `find` are not split
# shellcheck disable=SC2046
javac -source "${java_target}" -target "${java_target}" -Xlint:-options -cp test/deps/* -d "${tmp_dir}"/build $(find "${tmp_dir}"/gen/java -name '*.java')
jar cf test/gen/opentelemetry-gen-classes.jar -C "${tmp_dir}"/build .
rm -rf "${tmp_dir}"
}
[[ "${BASH_SOURCE[0]}" == "${0}" ]] && main "$@"
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.