mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish promotion script
See gh-12292
This commit is contained in:
parent
bfe31e6688
commit
df7ddeefc4
@ -48,18 +48,17 @@ if [[ $RELEASE_TYPE = "RELEASE" ]]; then
|
||||
ARTIFACTS_PUBLISHED=false
|
||||
WAIT_TIME=5
|
||||
COUNTER=0
|
||||
while [ $ARTIFACTS_PUBLISHED == "false" ] && [ $COUNTER -lt 24 ]; do
|
||||
result=$(curl https://api.bintray.com/packages/${BINTRAY_SUBJECT}/${BINTRAY_REPO}/$groupId )
|
||||
versions=$( echo $result | jq -r '.versions' )
|
||||
exists=$(echo $versions | grep $version)
|
||||
if [ $? -eq 0 ]; then
|
||||
while [ $ARTIFACTS_PUBLISHED == "false" ] && [ $COUNTER -lt 60 ]; do
|
||||
result=$( curl https://api.bintray.com/packages/"${BINTRAY_SUBJECT}"/"${BINTRAY_REPO}"/"${groupId}" )
|
||||
versions=$( echo "$result" | jq -r '.versions' )
|
||||
exists=$( echo "$versions" | grep "$version" -o || true )
|
||||
if [ "$exists" = "$version" ]; then
|
||||
ARTIFACTS_PUBLISHED=true
|
||||
fi
|
||||
COUNTER=$(( $COUNTER + 1))
|
||||
echo $COUNTER
|
||||
sleep WAIT_TIME
|
||||
fi
|
||||
COUNTER=$(( COUNTER + 1 ))
|
||||
sleep $WAIT_TIME
|
||||
done
|
||||
if [ $ARTIFACTS_PUBLISHED == "false" ]; then
|
||||
if [[ $ARTIFACTS_PUBLISHED = "false" ]]; then
|
||||
echo "Failed to publish"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user