Small release improvements
ADD
.github/scripts/update-sdk-version.sh
+#!/bin/bash -e
+
+version=$1
+
+alpha_version=${version}-alpha
+
+sed -Ei "s/val otelVersion = \"[^\"]*\"/val otelVersion = \"$version\"/" dependencyManagement/build.gradle.kts
+
+sed -Ei "s/(opentelemetry *: )\"[^\"]*\"/\1\"$version\"/" examples/distro/build.gradle
+sed -Ei "s/(opentelemetryAlpha *: )\"[^\"]*\"/\1\"$alpha_version\"/" examples/distro/build.gradle
+
+sed -Ei "s/(opentelemetry *: )\"[^\"]*\"/\1\"$version\"/" examples/extension/build.gradle
+sed -Ei "s/(opentelemetryAlpha *: )\"[^\"]*\"/\1\"$alpha_version\"/" examples/extension/build.gradle

MODIFY
.github/scripts/update-version.sh
.github/scripts/update-version.sh
@@ -5,7 +5,7 @@ version=$1
if [[ $version == *-SNAPSHOT ]]; then
alpha_version=${version//-SNAPSHOT/-alpha-SNAPSHOT}
else
- alpha_version=$version-alpha
+ alpha_version=${version}-alpha
fi
sed -Ei "s/val stableVersion = \"[^\"]*\"/val stableVersion = \"$version\"/" version.gradle.kts

MODIFY
.github/workflows/reusable-create-java-contrib-pull-request.yml
.github/workflows/reusable-create-java-contrib-pull-request.yml
@@ -37,14 +37,10 @@ jobs:
- name: Update version
env:
VERSION: ${{ inputs.version }}
- run: |
- sed -i "s/^val otelVersion = .*/val otelVersion = \"$VERSION\"/" dependencyManagement/build.gradle.kts
+ run: ./.github/scripts/update-sdk-version.sh $VERSION
- name: Use CLA approved github bot
- run: |
- # cannot run the use-cla-approved-github-bot.sh script here since in a different repo
- git config user.name opentelemetrybot
- git config user.email 107717825+opentelemetrybot@users.noreply.github.com
+ run: .github/scripts/use-cla-approved-github-bot.sh
- name: Create pull request against opentelemetry-java-contrib
env:

MODIFY
dependencyManagement/build.gradle.kts
dependencyManagement/build.gradle.kts
@@ -11,7 +11,9 @@ data class DependencySet(val group: String, val version: String, val modules: Li
val dependencyVersions = hashMapOf<String, String>()
rootProject.extra["versions"] = dependencyVersions
+// this line is managed by .github/scripts/update-sdk-version.sh
val otelVersion = "1.16.0"
+
rootProject.extra["otelVersion"] = otelVersion
// Need both BOM and groovy jars

MODIFY
examples/distro/build.gradle
examples/distro/build.gradle
@@ -20,10 +20,14 @@ subprojects {
ext {
versions = [
+ // these lines are managed by .github/scripts/update-sdk-version.sh
opentelemetry : "1.16.0",
opentelemetryAlpha : "1.16.0-alpha",
+
+ // these lines are managed by .github/scripts/update-version.sh
opentelemetryJavaagent : "1.17.0-SNAPSHOT",
opentelemetryJavaagentAlpha: "1.17.0-alpha-SNAPSHOT",
+
bytebuddy : "1.12.10",
autoservice : "1.0.1"
]

MODIFY
examples/extension/build.gradle
examples/extension/build.gradle
@@ -22,8 +22,11 @@ version '1.0'
ext {
versions = [
+ // these lines are managed by .github/scripts/update-sdk-version.sh
opentelemetry : "1.16.0",
opentelemetryAlpha : "1.16.0-alpha",
+
+ // these lines are managed by .github/scripts/update-version.sh
opentelemetryJavaagent : "1.17.0-SNAPSHOT",
opentelemetryJavaagentAlpha: "1.17.0-alpha-SNAPSHOT",
]

Small release improvements (#6433)