|
3 | 3 |
|
4 | 4 | SOURCEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" |
5 | 5 |
|
| 6 | +contrib_version=$(awk -F'=v' '/OTEL_JAVA_CONTRIB_VERSION/ {print $2}' "$file") |
| 7 | +if [[ -n "$contrib_version" ]]; then |
| 8 | + echo "Found OTEL Contrib Version: ${contrib_version}" |
| 9 | + ## Clone and Patch the OpenTelemetry Java contrib Repository |
| 10 | + echo "Info: Cloning and Patching OpenTelemetry Java contrib Repository" |
| 11 | + git clone https://github.com/open-telemetry/opentelemetry-java-contrib.git |
| 12 | + pushd opentelemetry-java-contrib |
| 13 | + git checkout v${contrib_version} -b tag-v${contrib_version} |
| 14 | + |
| 15 | + # There is another patch in the .github/patches directory for other changes. We should apply them too for consistency. |
| 16 | + patch -p1 < "$SOURCEDIR"/../.github/patches/opentelemetry-java-contrib.patch |
| 17 | + |
| 18 | + ./gradlew publishToMavenLocal |
| 19 | + popd |
| 20 | + rm -rf opentelemetry-java-contrib |
| 21 | +fi |
6 | 22 |
|
7 | 23 | ## Get OTel version |
8 | 24 | echo "Info: Getting OTEL Version" |
@@ -34,23 +50,6 @@ patch -p1 < "$SOURCEDIR"/patches/StreamHandlerInstrumentation.patch |
34 | 50 | popd |
35 | 51 | rm -rf opentelemetry-java-instrumentation |
36 | 52 |
|
37 | | -contrib_version=$(awk -F'=v' '/OTEL_JAVA_CONTRIB_VERSION/ {print $2}' "$file") |
38 | | -if [[ -n "$contrib_version" ]]; then |
39 | | - echo "Found OTEL Contrib Version: ${contrib_version}" |
40 | | - ## Clone and Patch the OpenTelemetry Java contrib Repository |
41 | | - echo "Info: Cloning and Patching OpenTelemetry Java contrib Repository" |
42 | | - git clone https://github.com/open-telemetry/opentelemetry-java-contrib.git |
43 | | - pushd opentelemetry-java-contrib |
44 | | - git checkout v${contrib_version} -b tag-v${contrib_version} |
45 | | - |
46 | | - # There is another patch in the .github/patches directory for other changes. We should apply them too for consistency. |
47 | | - patch -p1 < "$SOURCEDIR"/../.github/patches/opentelemetry-java-contrib.patch |
48 | | - |
49 | | - ./gradlew publishToMavenLocal |
50 | | - popd |
51 | | - rm -rf opentelemetry-java-contrib |
52 | | -fi |
53 | | - |
54 | 53 | ## Build the ADOT Java from current source |
55 | 54 | echo "Info: Building ADOT Java from current source" |
56 | 55 | pushd "$SOURCEDIR"/.. |
|
0 commit comments