@@ -8,16 +8,16 @@ DELAY=60
8
8
# $2: executable bucket
9
9
# $3: pkg bucket
10
10
cleanUpSigningArtifactInS3Buckets () {
11
- aws s3 rm s3://${2} -${1// _/ -} /pre-signed/package.tar.gz
12
- aws s3 rm s3://${2} -${1// _/ -} /signed/finch-executables-${1// _/ -} .zip
13
- aws s3 rm s3://${3} -${1// _/ -} /pre-signed/package.tar.gz
14
- aws s3 rm s3://${3} -${1// _/ -} /signed/finch-pkg-${1// _/ -} .zip
11
+ aws s3 rm " s3://${2} -${1// _/ -} /pre-signed/package.tar.gz"
12
+ aws s3 rm " s3://${2} -${1// _/ -} /signed/finch-executables-${1// _/ -} .zip"
13
+ aws s3 rm " s3://${3} -${1// _/ -} /pre-signed/package.tar.gz"
14
+ aws s3 rm " s3://${3} -${1// _/ -} /signed/finch-pkg-${1// _/ -} .zip"
15
15
}
16
16
17
17
# $1: arch: {x86_64, aarch64}
18
18
# $2: executable bucket
19
19
uploadUnsignedExecutables () {
20
- aws s3 cp ./installer-builder/output/executables/unsigned/package.tar.gz s3://${2} -${1// _/ -} /pre-signed/package.tar.gz --no-progress
20
+ aws s3 cp ./installer-builder/output/executables/unsigned/package.tar.gz " s3://${2} -${1// _/ -} /pre-signed/package.tar.gz" --no-progress
21
21
}
22
22
23
23
# $1: arch: {x86_64, aarch64}
@@ -26,25 +26,25 @@ downloadSignedExecutables() {
26
26
attempts=0
27
27
while [ $attempts -lt $MAX_RETRY ]
28
28
do
29
- aws s3 cp s3://${2} -${1// _/ -} /signed/finch-executables-${1// _/ -} .zip ./installer-builder/output/executables/signed --no-progress && break
30
- attempts=$(( $ attempts+ 1 ))
29
+ aws s3 cp " s3://${2} -${1// _/ -} /signed/finch-executables-${1// _/ -} .zip" ./installer-builder/output/executables/signed --no-progress && break
30
+ attempts=$(( attempts+ 1 ))
31
31
echo " Wait $DELAY seconds and retry..."
32
32
sleep $DELAY
33
33
done
34
34
35
35
if [ $attempts -eq $MAX_RETRY ]
36
36
then
37
- echo " Download failed after $MAT_RETRY attempts."
37
+ echo " Download failed after $MAX_RETRY attempts."
38
38
fi
39
39
40
- tar xzvf ./installer-builder/output/executables/signed/finch-executables-${1// _/ -} .zip -C ./installer-builder/output/executables/signed
41
- aws s3 rm s3://${2} -${1// _/ -} /pre-signed/package.tar.gz
40
+ tar xzvf " ./installer-builder/output/executables/signed/finch-executables-${1// _/ -} .zip" -C ./installer-builder/output/executables/signed
41
+ aws s3 " rm s3://${2} -${1// _/ -} /pre-signed/package.tar.gz"
42
42
}
43
43
44
44
# $1: arch: {x86_64, aarch64}
45
45
# $2: pkg bucket
46
46
uploadUnsignedPkg () {
47
- aws s3 cp ./installer-builder/output/installer/unsigned/package.tar.gz s3://${2} -${1// _/ -} /pre-signed/package.tar.gz --no-progress
47
+ aws s3 cp ./installer-builder/output/installer/unsigned/package.tar.gz " s3://${2} -${1// _/ -} /pre-signed/package.tar.gz" --no-progress
48
48
}
49
49
50
50
# $1: arch: {x86_64, aarch64}
@@ -53,27 +53,27 @@ downloadSignedPkg() {
53
53
attempts=0
54
54
while [ $attempts -lt $MAX_RETRY ]
55
55
do
56
- aws s3 cp s3://${2} -${1// _/ -} /signed/finch-pkg-${1// _/ -} .zip ./installer-builder/output/installer/signed --no-progress && break
57
- attempts=$(( $ attempts+ 1 ))
56
+ aws s3 cp " s3://${2} -${1// _/ -} /signed/finch-pkg-${1// _/ -} .zip" ./installer-builder/output/installer/signed --no-progress && break
57
+ attempts=$(( attempts+ 1 ))
58
58
echo " Wait $DELAY seconds and retry..."
59
59
sleep $DELAY
60
60
done
61
61
62
62
if [ $attempts -eq $MAX_RETRY ]
63
63
then
64
- echo " Download failed after $MAT_RETRY attempts."
64
+ echo " Download failed after $MAX_RETRY attempts."
65
65
fi
66
66
67
- tar xzvf ./installer-builder/output/installer/signed/finch-pkg-${1// _/ -} .zip -C ./installer-builder/output/installer/signed
68
- aws s3 rm s3://${2} -${1// _/ -} /pre-signed/package.tar.gz
67
+ tar xzvf " ./installer-builder/output/installer/signed/finch-pkg-${1// _/ -} .zip" -C ./installer-builder/output/installer/signed
68
+ aws s3 rm " s3://${2} -${1// _/ -} /pre-signed/package.tar.gz"
69
69
}
70
70
71
71
# $1: arch: {x86_64, aarch64}
72
72
# $2: version
73
73
# $3: private pkg bucket
74
74
uploadNotarizedPkg () {
75
75
# rename and upload the final installer
76
- mv ./installer-builder/output/installer/signed/Payload/Finch.pkg ./installer-builder/output/installer/signed/Payload/Finch-${2} -${1} .pkg
77
- aws s3 rm s3://${3} /Finch-${2} -${1} .pkg
78
- aws s3 cp ./installer-builder/output/installer/signed/Payload/Finch-${2} -${1} .pkg s3://${3} /Finch-${2} -${1} .pkg --no-progress
76
+ mv ./installer-builder/output/installer/signed/Payload/Finch.pkg " ./installer-builder/output/installer/signed/Payload/Finch-${2} -${1} .pkg"
77
+ aws s3 rm " s3://${3} /Finch-${2} -${1} .pkg"
78
+ aws s3 cp " ./installer-builder/output/installer/signed/Payload/Finch-${2} -${1} .pkg" " s3://${3} /Finch-${2} -${1} .pkg" --no-progress
79
79
}
0 commit comments