Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 502a024

Browse files
committed
Applying the latest changes
1 parent 6ecea44 commit 502a024

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

.github/scripts/update_generation_config.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@ function update_config() {
4848
}
4949

5050
# Update an action to a new version in GitHub action.
51+
# the second argument must have the git tag (including "v").
5152
function update_action() {
5253
local key_word=$1
5354
local new_value=$2
5455
local file=$3
5556
echo "Update ${key_word} to ${new_value} in ${file}"
5657
# use a different delimiter because the key_word contains "/".
57-
sed -i -e "s|${key_word}@v.*$|${key_word}@v${new_value}|" "${file}"
58+
sed -i -e "s|${key_word}@[^ ]*$|${key_word}@${new_value}|" "${file}"
5859
}
5960

6061
# The parameters of this script is:
@@ -143,12 +144,16 @@ rm -rf tmp-googleapis
143144
update_config "googleapis_commitish" "${latest_commit}" "${generation_config}"
144145

145146
# Update gapic-generator-java version to the latest
146-
latest_version=$(get_latest_released_version "com.google.api" "gapic-generator-java")
147-
update_config "gapic_generator_version" "${latest_version}" "${generation_config}"
148-
149-
# Update composite action version to latest gapic-generator-java version
147+
latest_gapic_generator_version=$(get_latest_released_version "com.google.api" "gapic-generator-java")
148+
update_config "gapic_generator_version" "${latest_gapic_generator_version}" "${generation_config}"
149+
150+
# Update the GitHub Actions reference to the latest.
151+
# After the google-cloud-java monorepo migration of sdk-platform-java,
152+
# we cannot rely on the gapic-generator-java version tag. Let's use
153+
# the shared dependencies BOM version
154+
latest_shared_dependencies_bom_version=$(get_latest_released_version "com.google.cloud" "google-cloud-shared-dependencies")
150155
update_action "googleapis/google-cloud-java/sdk-platform-java/.github/scripts" \
151-
"${latest_version}" \
156+
"google-cloud-shared-dependencies/v${latest_shared_dependencies_bom_version}" \
152157
"${workflow}"
153158

154159
# Update libraries-bom version to the latest

.github/workflows/hermetic_library_generation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
fetch-depth: 0
3939
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
40-
- uses: googleapis/google-cloud-java/sdk-platform-java/.github/scripts@v2.71.0
40+
- uses: googleapis/google-cloud-java/sdk-platform-java/.github/scripts@google-cloud-shared-dependencies/v3.61.0
4141
if: env.SHOULD_RUN == 'true'
4242
with:
4343
image_tag: latest

0 commit comments

Comments
 (0)