Skip to content

Commit 16cfa1b

Browse files
committed
refactor: extract fallback tag from versions.txt instead of workflow yaml
1 parent 53d67a1 commit 16cfa1b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

generation/run_generator_docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ 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 workflow file
50-
PREVIOUS_TAG=$(git show "${TARGET_BRANCH}":.github/workflows/hermetic_library_generation.yaml | grep -m 1 "^[[:space:]]*image_tag:" | cut -d ':' -f 2- | cut -d '#' -f 1 | xargs || true)
49+
# Extract tag from target branch's versions.txt
50+
PREVIOUS_TAG=$(git show "${TARGET_BRANCH}":versions.txt | grep "^gapic-generator-java:" | cut -d ':' -f 2 || true)
5151
if [ -n "$PREVIOUS_TAG" ]; then
5252
echo "Using previous image version: $PREVIOUS_TAG"
5353
IMAGE_TAG="$PREVIOUS_TAG"

0 commit comments

Comments
 (0)