Skip to content

Commit

Permalink
ci: fix existing_version_check false positives (#11327)
Browse files Browse the repository at this point in the history
b/370046361
  • Loading branch information
suztomo authored Nov 22, 2024
1 parent 369183d commit 4373302
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions generation/check_existing_release_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ function find_existing_version_pom() {
local group_id_dir="${group_id//\.//}"
local URL="${MAVEN_SITE}/${group_id_dir}/${artifact_id}/${version}/${artifact_id}-${version}.pom"
local status_code=$(curl --silent --head -o /dev/null -w "%{http_code}" $URL)
if [ "${status_code}" == "404" ]; then
echo " The version does not exists. Good"
else
if [ "${status_code}" == "200" ]; then
echo " The version already exists at ${URL}. Please investigate."
return_code=1
else
echo " The version does not exists (status_code ${status_code} for ${URL}). Good."
fi

}

return_code=0
Expand Down

0 comments on commit 4373302

Please sign in to comment.