Skip to content

Commit 22dc128

Browse files
committed
[GHA] correct wait times
1 parent f563a91 commit 22dc128

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/scripts/sign-exe-in-zip-file.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ echo "Successfully extracted ${filename}"
1818
sts_folder=`find ./${destination_folder_name} -maxdepth 1 -type d -name 'sts-*' -print -quit`
1919
echo "Found STS distro folder: ${sts_folder}"
2020
echo "About to sign win exe file: ${sts_folder}/SpringToolSuite4.exe (id = ${id})"
21-
$sign_script ${sts_folder}/SpringToolSuite4.exe ${sts_folder}/SpringToolSuite4.exe "${id}-${filename%.*}" 30 30
21+
$sign_script ${sts_folder}/SpringToolSuite4.exe ${sts_folder}/SpringToolSuite4.exe "${id}-${filename%.*}" 30 900
2222
echo "Adding to zip contents of a folder ${destination_folder_name}"
2323
cd ${destination_folder_name}
2424
zip -r -q ../$file .

.github/scripts/sign-exe.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,20 @@ in_file=$1
33
out_file=$2
44
id=$3
55
wait_time=$4
6-
number_of_sleeps=$5
6+
timeout=$5
77

88
in_filename="$(basename -- $in_file)"
99
echo "Copying ${in_file} to s3 s3://${AWS_S3_BUCKET}/exes-to-sign/${id}.exe for signing"
1010
aws s3 cp $in_file s3://$AWS_S3_BUCKET/exes-to-sign/$id.exe
11-
for i in {1..$number_of_sleeps}
12-
do
11+
for (( i=wait_time; i<timeout; i+=wait_time )) ; {
1312
sleep $wait_time
1413
aws s3api head-object --bucket $CDN_BUCKET --key spring-tools/exes-signed/$id.exe || NOT_EXIST=true
1514
if [ $NOT_EXIST ]; then
16-
echo "Waited ${wait_time} seconds but ${in_filename} hasn't been signed yet..."
15+
echo "Waited ${i} seconds but ${in_filename} hasn't been signed yet..."
1716
else
1817
echo "Successfully signed file ${in_filename}"
1918
break
2019
fi
21-
done
20+
}
2221
aws mv s3://$AWS_S3_BUCKET/exes-signed/$id.exe $out_file
2322

0 commit comments

Comments
 (0)