Skip to content

Commit 5552646

Browse files
authored
Release patch (#1255)
*Issue #, if available:* *Description of changes:* The 2.20.0 release build failed with at the step "Build and Publish release with Gradle": ``` org.gradle.api.GradleException: version should not be set in build file when using nebula-release plugin. Instead use `-Prelease.version` parameter ``` The following PR fixes version.gradle.kts to not touch project.version at all if the `-Prelease.version` flag is passed in to an environment. It also creates a copy of the release build workflow that only re-runs the failed Sonatype step in publish-sdk (did 2PR with @jj22ee to confirm). By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent bd79676 commit 5552646

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

.github/workflows/release-build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,16 @@ jobs:
205205
shell: bash
206206
run: .github/scripts/test-adot-javaagent-image.sh "${{ env.TEST_TAG }}" "$VERSION"
207207

208-
- name: Build and push image
209-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
210-
with:
211-
push: true
212-
build-args: "ADOT_JAVA_VERSION=${{ github.event.inputs.version }}"
213-
context: .
214-
platforms: linux/amd64,linux/arm64
215-
tags: |
216-
${{ env.PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}
217-
${{ env.PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
208+
# - name: Build and push image
209+
# uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
210+
# with:
211+
# push: true
212+
# build-args: "ADOT_JAVA_VERSION=${{ github.event.inputs.version }}"
213+
# context: .
214+
# platforms: linux/amd64,linux/arm64
215+
# tags: |
216+
# ${{ env.PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}
217+
# ${{ env.PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
218218

219219
- name: Build and Publish release with Gradle
220220
uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 #v3.5.0

version.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
val adotVersion = "2.20.0"
1717

1818
allprojects {
19-
version = if (project.hasProperty("release.version")) {
20-
project.property("release.version") as String
21-
} else {
22-
adotVersion
19+
if (!project.hasProperty("release.version")) {
20+
version = adotVersion
2321
}
2422
}

0 commit comments

Comments
 (0)