Skip to content

Commit 7db8a6c

Browse files
authored
chore(java): ignore return code 28 in README autosynth job (#843)
Exit code 28 is returned if no changes are required and should not be considered a failure.
1 parent 1f1148d commit 7db8a6c

File tree

1 file changed

+10
-1
lines changed
  • synthtool/gcp/templates/java_library/.kokoro

1 file changed

+10
-1
lines changed

synthtool/gcp/templates/java_library/.kokoro/readme.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,18 @@ echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials
2828
git config --global credential.helper 'store --file ~/.git-credentials'
2929

3030
python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool
31+
32+
set +e
3133
python3.6 -m autosynth.synth \
3234
--repository={{metadata['repo']['repo']}} \
3335
--synth-file-name=.github/readme/synth.py \
3436
--metadata-path=.github/readme/synth.metadata \
3537
--pr-title="chore: regenerate README" \
36-
--branch-suffix="readme"
38+
--branch-suffix="readme"
39+
40+
# autosynth returns 28 to signal there are no changes
41+
RETURN_CODE=$?
42+
if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]]
43+
then
44+
exit ${RETURN_CODE}
45+
fi

0 commit comments

Comments
 (0)