From 3dfe969cdfa9b21b4ad8621ea751e2c819e8ad79 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 10 Nov 2020 02:19:56 -0800 Subject: [PATCH] chore(java): ignore return code 28 in README autosynth job Exit code 28 is returned if no changes are required and should not be considered a failure. Source-Author: Jeff Ching Source-Date: Mon Nov 9 14:51:28 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 7db8a6c5ffb12a6e4c2f799c18f00f7f3d60e279 Source-Link: https://github.com/googleapis/synthtool/commit/7db8a6c5ffb12a6e4c2f799c18f00f7f3d60e279 --- .kokoro/readme.sh | 11 ++++++++++- synth.metadata | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh index b9e4ab7f..5d9af0f1 100755 --- a/.kokoro/readme.sh +++ b/.kokoro/readme.sh @@ -28,9 +28,18 @@ echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials git config --global credential.helper 'store --file ~/.git-credentials' python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool + +set +e python3.6 -m autosynth.synth \ --repository=googleapis/java-datalabeling \ --synth-file-name=.github/readme/synth.py \ --metadata-path=.github/readme/synth.metadata \ --pr-title="chore: regenerate README" \ - --branch-suffix="readme" \ No newline at end of file + --branch-suffix="readme" + +# autosynth returns 28 to signal there are no changes +RETURN_CODE=$? +if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]] +then + exit ${RETURN_CODE} +fi diff --git a/synth.metadata b/synth.metadata index f1710e32..8a2c9ace 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-datalabeling.git", - "sha": "66041b9a6eed1d97c3413b78246390054d71bd74" + "sha": "33b2712cbb557a56af9ab65e646a2854a6a0fc4a" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "c7824ea48ff6d4d42dfae0849aec8a85acd90bd9" + "sha": "7db8a6c5ffb12a6e4c2f799c18f00f7f3d60e279" } } ],