Skip to content

Commit efd0ddc

Browse files
Burak Bayırkriptoburak
andauthored
fix(release): allow Maven publication propagation (#32)
Co-authored-by: kriptoburak <kriptoburak@users.noreply.github.com>
1 parent ceb35d9 commit efd0ddc

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

bin/verify-release-signature

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ module="x-twitter-scraper-java"
1919
artifact="$module-$version.jar"
2020
base_url="https://repo.maven.apache.org/maven2/com/xquik/api/$module/$version"
2121
expected_fingerprint="6965E561C0ACEE32060AB961D2037E4157E62A59"
22+
verification_timeout_minutes=20
23+
retry_delay_seconds=15
24+
max_attempts=$((verification_timeout_minutes * 60 / retry_delay_seconds))
2225
verification_workspace="$(
2326
mktemp -d "/tmp/xquik-java-verify.XXXXXX"
2427
)"
2528
verification_gnupg="$verification_workspace/gnupg"
2629
trap 'rm -rf -- "$verification_workspace"' EXIT
2730
mkdir -m 700 "$verification_gnupg"
2831

29-
for ((attempt = 1; attempt <= 40; attempt++)); do
32+
for ((attempt = 1; attempt <= max_attempts; attempt++)); do
3033
if curl \
3134
--fail \
3235
--location \
@@ -47,11 +50,11 @@ for ((attempt = 1; attempt <= 40; attempt++)); do
4750
--output "$verification_workspace/$artifact.asc"; then
4851
break
4952
fi
50-
if (( attempt == 40 )); then
51-
echo "Maven Central did not publish $artifact within 10 minutes." >&2
53+
if (( attempt == max_attempts )); then
54+
echo "Maven Central did not publish $artifact within $verification_timeout_minutes minutes." >&2
5255
exit 1
5356
fi
54-
sleep 15
57+
sleep "$retry_delay_seconds"
5558
done
5659

5760
GNUPGHOME="$verification_gnupg" gpg \

0 commit comments

Comments
 (0)