Skip to content

Commit 4373302

Browse files
authored
ci: fix existing_version_check false positives (#11327)
b/370046361
1 parent 369183d commit 4373302

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

generation/check_existing_release_versions.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ function find_existing_version_pom() {
2929
local group_id_dir="${group_id//\.//}"
3030
local URL="${MAVEN_SITE}/${group_id_dir}/${artifact_id}/${version}/${artifact_id}-${version}.pom"
3131
local status_code=$(curl --silent --head -o /dev/null -w "%{http_code}" $URL)
32-
if [ "${status_code}" == "404" ]; then
33-
echo " The version does not exists. Good"
34-
else
32+
if [ "${status_code}" == "200" ]; then
3533
echo " The version already exists at ${URL}. Please investigate."
3634
return_code=1
35+
else
36+
echo " The version does not exists (status_code ${status_code} for ${URL}). Good."
3737
fi
38-
3938
}
4039

4140
return_code=0

0 commit comments

Comments
 (0)