File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 33SOURCEDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd ) "
44
55
6- # # revert https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7970
7- OTEL_VERSION=" 1.32.1"
8- ADOT_VERSION=" 1.32.1"
6+ # # Get OTel version
7+ file=" $SOURCEDIR /../.github/patches/versions"
8+ version=$( awk -F' =v' ' /OTEL_JAVA_INSTRUMENTATION_VERSION/ {print $2}' " $file " )
9+ echo " Found OTEL Version: ${version} "
10+ # Exit if the version is empty or null
11+ if [[ -z " $version " ]]; then
12+ echo " Error: Version could not be found in ${file} ."
13+ exit 1
14+ fi
915
1016
1117# # Clone and Patch the OpenTelemetry Java Instrumentation Repository
1218git clone https://github.com/open-telemetry/opentelemetry-java-instrumentation.git
1319pushd opentelemetry-java-instrumentation
14- git checkout v${OTEL_VERSION } -b tag-v${OTEL_VERSION }
20+ git checkout v${version } -b tag-v${version }
1521
1622# This patch is for Lambda related context propagation
1723patch -p1 < " $SOURCEDIR " /patches/opentelemetry-java-instrumentation.patch
@@ -29,7 +35,7 @@ rm -rf opentelemetry-java-instrumentation
2935# # Build the ADOT Java from current source
3036pushd " $SOURCEDIR " /..
3137patch -p1 < " ${SOURCEDIR} " /patches/aws-otel-java-instrumentation.patch
32- CI=false ./gradlew publishToMavenLocal -Prelease.version=${ADOT_VERSION } -adot-lambda1
38+ CI=false ./gradlew publishToMavenLocal -Prelease.version=${version } -adot-lambda1
3339popd
3440
3541
You can’t perform that action at this time.
0 commit comments