Skip to content

Commit 06d6a50

Browse files
committed
ci(generation): fail on missing artifactId before skipping
1 parent 4b21994 commit 06d6a50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

generation/check_existing_release_versions.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +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 "${version}" ]; then
22-
echo " Skipping file without explicit coordinates (likely inherits): $pom_file"
23-
return 0
24-
fi
2521
if [ -z "${artifact_id}" ]; then
2622
echo "Couldn't parse artifact_id in the pom file: $pom_file"
2723
exit 1
2824
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
2929
if [[ "${version}" == *SNAPSHOT* ]] && [ "${artifact_id}" != "google-cloud-java" ]; then
3030
echo " Release Please pull request contains SNAPSHOT version. Please investigate."
3131
return_code=1

0 commit comments

Comments
 (0)