File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,14 +19,17 @@ module="x-twitter-scraper-java"
1919artifact=" $module -$version .jar"
2020base_url=" https://repo.maven.apache.org/maven2/com/xquik/api/$module /$version "
2121expected_fingerprint=" 6965E561C0ACEE32060AB961D2037E4157E62A59"
22+ verification_timeout_minutes=20
23+ retry_delay_seconds=15
24+ max_attempts=$(( verification_timeout_minutes * 60 / retry_delay_seconds))
2225verification_workspace=" $(
2326 mktemp -d " /tmp/xquik-java-verify.XXXXXX"
2427) "
2528verification_gnupg=" $verification_workspace /gnupg"
2629trap ' rm -rf -- "$verification_workspace"' EXIT
2730mkdir -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 "
5558done
5659
5760GNUPGHOME=" $verification_gnupg " gpg \
You can’t perform that action at this time.
0 commit comments