Skip to content

Commit b020e53

Browse files
authored
Merge branch 'release-please--fix-12825' into release-please--simulation
2 parents 3137fc8 + 43835e2 commit b020e53

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

generation/run_generator_docker.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ if [[ "$CURRENT_BRANCH" =~ ^release-please-- ]]; then
4646
echo "Detected release PR branch: $CURRENT_BRANCH"
4747
if ! docker pull "${IMAGE_NAME}:${IMAGE_TAG}"; then
4848
echo "Image not found for version ${IMAGE_TAG}. Falling back to previous version from ${TARGET_BRANCH}."
49-
# Extract tag from target branch's versions.txt
50-
PREVIOUS_TAG=$(git show origin/"${TARGET_BRANCH}":versions.txt | grep "^gapic-generator-java:" | cut -d ':' -f 2 || true)
49+
# Extract tag from target branch's versions.txt using explicit fetch
50+
git fetch origin "${TARGET_BRANCH}" --depth=1 || true
51+
PREVIOUS_TAG=$(git show FETCH_HEAD:versions.txt | grep "^gapic-generator-java:" | cut -d ':' -f 2 || true)
5152
if [ -n "$PREVIOUS_TAG" ]; then
5253
echo "Using previous image version: $PREVIOUS_TAG"
5354
IMAGE_TAG="$PREVIOUS_TAG"

sdk-platform-java/.cloudbuild/library_generation/library_generation.Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ ARG GRPC_VERSION=1.80.0
4343
ENV HOME=/home
4444
ENV OS_ARCHITECTURE="linux-x86_64"
4545

46+
# {x-version-update-start:gapic-generator-java:current}
47+
ENV GENERATOR_VERSION="2.71.0"
48+
# {x-version-update-end}
49+
4650
# install OS tools
4751
RUN apt update && apt install -y curl unzip rsync jq nodejs npm git openjdk-17-jdk
4852

0 commit comments

Comments
 (0)