Skip to content

Commit 4e566af

Browse files
authored
ci(generation): skip files inheriting coordinates in release check (#12850)
Fixes #12840
1 parent e7acf44 commit 4e566af

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

generation/check_existing_release_versions.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ function find_existing_version_pom() {
1818
local version=$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' \
1919
"${pom_file}")
2020
echo -n "Checking ${group_id}:${artifact_id}:${version}:"
21-
if [ -z "${group_id}" ] || [ -z "${artifact_id}" ] || [ -z "${version}" ]; then
22-
echo "Couldn't parse the pom file: $pom_file"
21+
if [ -z "${artifact_id}" ]; then
22+
echo "Couldn't parse artifact_id in the pom file: $pom_file"
2323
exit 1
2424
fi
25+
if [ -z "${group_id}" ] || [ -z "${version}" ]; then
26+
echo "Skipping file without explicit coordinates (likely inherits): $pom_file"
27+
return 0
28+
fi
2529
if [[ "${version}" == *SNAPSHOT* ]] && [ "${artifact_id}" != "google-cloud-java" ]; then
2630
echo " Release Please pull request contains SNAPSHOT version. Please investigate."
2731
return_code=1

0 commit comments

Comments
 (0)