@@ -138,7 +138,7 @@ sign() {
138138 echo " "
139139
140140 while true ; do
141- printf " Upload files to %s? [y/n] " " $webhost "
141+ printf " Upload files to %s and Cloudflare R2 ? [y/n] " " $webhost "
142142 yorn=" "
143143 read -r yorn
144144
@@ -147,37 +147,26 @@ sign() {
147147 fi
148148
149149 if [ " X${yorn} " = " Xy" ]; then
150+ # Copy SHASUMS256.txt and its signatures to the web host:
150151 # shellcheck disable=SC2086
151152 scp ${customsshkey} " ${tmpdir} /${shafile} " " ${tmpdir} /${shafile} .asc" " ${tmpdir} /${shafile} .sig" " ${webuser} @${webhost} :${shadir} /"
152153 # shellcheck disable=SC2086,SC2029
153154 ssh ${customsshkey} " ${webuser} @${webhost} " chmod 644 " ${shadir} /${shafile} .asc" " ${shadir} /${shafile} .sig"
154- break
155- fi
156- done
157155
158- while true ; do
159- printf " Upload files from %s to R2 staging bucket? [y/n]" " $webhost "
160- yorn=" "
161- read -r yorn
162-
163- if [ " X${yorn} " = " Xn" ]; then
164- break
165- fi
166-
167- if [ " X${yorn} " = " Xy" ]; then
168- # Note: the binaries and SHASUMS256.txt should already be in this bucket since the DO will upload them
156+ # Copy the signatures to Cloudflare R2:
157+ # Note: the binaries and SHASUMS256.txt should already be in the bucket
158+ # since the promotion script should take care of uploading them.
169159
170160 # Remove /home/dist/ part
171161 r2dir=$( echo " $shadir " | cut -c 11-)
172162
173- # Copy SHASUM256 .txt.asc
163+ # Copy SHASUMS256 .txt.asc
174164 # shellcheck disable=SC2086,SC2029
175- ssh ${customsshkey} " $webuser @ $ webhost" aws s3 cp " ${shadir} /${shafile} .asc" " s3://${cloudflare_bucket} /${r2dir} /${shafile} .asc" --endpoint=" ${cloudflare_endpoint} " --profile=${cloudflare_profile}
165+ ssh ${customsshkey} " ${ webuser} @ ${ webhost} " aws s3 cp " ${shadir} /${shafile} .asc" " s3://${cloudflare_bucket} /${r2dir} /${shafile} .asc" --endpoint=" ${cloudflare_endpoint} " --profile=${cloudflare_profile}
176166
177- # Copy SHASUM256 .txt.sig
167+ # Copy SHASUMS256 .txt.sig
178168 # shellcheck disable=SC2086,SC2029
179- ssh ${customsshkey} " $webuser @$webhost " aws s3 cp " ${shadir} /${shafile} .sig" " s3://${cloudflare_bucket} /${r2dir} /${shafile} .sig" --endpoint=" ${cloudflare_endpoint} " --profile=${cloudflare_profile}
180-
169+ ssh ${customsshkey} " ${webuser} @${webhost} " aws s3 cp " ${shadir} /${shafile} .sig" " s3://${cloudflare_bucket} /${r2dir} /${shafile} .sig" --endpoint=" ${cloudflare_endpoint} " --profile=${cloudflare_profile}
181170 break
182171 fi
183172 done
0 commit comments