Fix release workflow (#6040)

This commit is contained in:
Trask Stalnaker 2022-05-16 19:59:42 -07:00 committed by GitHub
parent 43a7c219aa
commit 4fa30a84b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 11 deletions

View File

@ -1,10 +1,6 @@
#!/bin/bash -e
sed -Ei "s/[0-9]+\.[0-9]+\.[0-9]+/$1/" version.gradle.kts
# also update versions in these files
# - examples/distro/build.gradle
# - examples/extension/build.gradle
version=$1
if [[ $version == *-SNAPSHOT ]]; then
alpha_version=${version//-SNAPSHOT/-alpha-SNAPSHOT}
@ -12,6 +8,9 @@ else
alpha_version=$version-alpha
fi
sed -Ei "s/val stableVersion = \"[^\"]*\"/val stableVersion = \"$version\"/" version.gradle.kts
sed -Ei "s/val alphaVersion = \"[^\"]*\"/val alphaVersion = \"$alpha_version\"/" version.gradle.kts
sed -Ei "s/(opentelemetryJavaagent *: )\"[^\"]*\"/\1\"$version\"/" examples/distro/build.gradle
sed -Ei "s/(opentelemetryJavaagentAlpha *: )\"[^\"]*\"/\1\"$alpha_version\"/" examples/distro/build.gradle

View File

@ -21,7 +21,7 @@ jobs:
echo "VERSION=$major_minor.$((patch + 1))" >> $GITHUB_ENV
- name: Update version
run: .github/scripts/update-version.sh $VERSION ${VERSION}-alpha
run: .github/scripts/update-version.sh $VERSION
- name: Update download link version
run: |

View File

@ -21,12 +21,11 @@ jobs:
echo "RELEASE_BRANCH_NAME=$release_branch_name" >> $GITHUB_ENV
- name: Update version
run: .github/scripts/update-version.sh $VERSION ${VERSION}-alpha
run: .github/scripts/update-version.sh $VERSION
- name: Update download link version
run: |
version=$(.github/scripts/get-version.sh)
sed -Ei "s,https://github\.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/,https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/," README.md
sed -Ei "s,https://github\.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/,https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$VERSION/," README.md
- name: Set git user
run: .github/scripts/set-git-user.sh
@ -67,8 +66,7 @@ jobs:
- name: Update version
run: |
next_alpha_version=${NEXT_VERSION//-SNAPSHOT/}-alpha-SNAPSHOT
.github/scripts/update-version.sh $NEXT_VERSION $NEXT_ALPHA_VERSION
.github/scripts/update-version.sh $NEXT_VERSION
- name: Set git user
run: .github/scripts/set-git-user.sh