Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6e7a60d

Browse files
committedMar 26, 2025·
update templates to latest
1 parent e4a3c44 commit 6e7a60d

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed
 

‎.github/scripts/update_generation_config.sh

+9-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@ set -e
1515
function get_latest_released_version() {
1616
local group_id=$1
1717
local artifact_id=$2
18-
latest=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json" | jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' | sort -V | tail -n 1)
19-
echo "${latest}"
18+
json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json")
19+
latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1)
20+
if [[ -z "${latest}" ]]; then
21+
echo "The latest version of ${group_id}:${artifact_id} is empty."
22+
echo "The returned json from maven.org is invalid: ${json_content}"
23+
exit 1
24+
else
25+
echo "${latest}"
26+
fi
2027
}
2128

2229
# Update a key to a new value in the generation config.

‎.github/trusted-contribution.yml

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
trustedContributors:
22
- renovate-bot
33
- gcf-owl-bot[bot]
4+
5+
annotations:
6+
- type: comment
7+
text: "/gcbrun"
8+
- type: label
9+
text: "kokoro:force-run"

‎.github/workflows/update_generation_config.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ on:
2121

2222
jobs:
2323
update-generation-config:
24-
runs-on: ubuntu-24.04
24+
runs-on: ubuntu-22.04
2525
env:
2626
# the branch into which the pull request is merged
2727
base_branch: main
2828
steps:
2929
- uses: actions/checkout@v4
3030
with:
31+
fetch-depth: 0
3132
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
3233
- name: Update params in generation config to latest
3334
shell: bash
@@ -36,7 +37,8 @@ jobs:
3637
[ -z "$(git config user.email)" ] && git config --global user.email "cloud-java-bot@google.com"
3738
[ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot"
3839
bash .github/scripts/update_generation_config.sh \
39-
--base_branch "${base_branch}"\
40+
--base_branch "${base_branch}" \
4041
--repo ${{ github.repository }}
4142
env:
4243
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
44+

‎.kokoro/trampoline.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)
Please sign in to comment.