File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 "
You can’t perform that action at this time.
0 commit comments