diff --git a/tools/release.sh b/tools/release.sh index cf607b6442999d..36576a53aac075 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -138,7 +138,7 @@ sign() { echo "" while true; do - printf "Upload files to %s? [y/n] " "$webhost" + printf "Upload files to %s and Cloudflare R2? [y/n] " "$webhost" yorn="" read -r yorn @@ -147,37 +147,26 @@ sign() { fi if [ "X${yorn}" = "Xy" ]; then + # Copy SHASUMS256.txt and its signatures to the web host: # shellcheck disable=SC2086 scp ${customsshkey} "${tmpdir}/${shafile}" "${tmpdir}/${shafile}.asc" "${tmpdir}/${shafile}.sig" "${webuser}@${webhost}:${shadir}/" # shellcheck disable=SC2086,SC2029 ssh ${customsshkey} "${webuser}@${webhost}" chmod 644 "${shadir}/${shafile}.asc" "${shadir}/${shafile}.sig" - break - fi - done - while true; do - printf "Upload files from %s to R2 staging bucket? [y/n]" "$webhost" - yorn="" - read -r yorn - - if [ "X${yorn}" = "Xn" ]; then - break - fi - - if [ "X${yorn}" = "Xy" ]; then - # Note: the binaries and SHASUMS256.txt should already be in this bucket since the DO will upload them + # Copy the signatures to Cloudflare R2: + # Note: the binaries and SHASUMS256.txt should already be in the bucket + # since the promotion script should take care of uploading them. # Remove /home/dist/ part r2dir=$(echo "$shadir" | cut -c 11-) - # Copy SHASUM256.txt.asc + # Copy SHASUMS256.txt.asc # shellcheck disable=SC2086,SC2029 - ssh ${customsshkey} "$webuser@$webhost" aws s3 cp "${shadir}/${shafile}.asc" "s3://${cloudflare_bucket}/${r2dir}/${shafile}.asc" --endpoint="${cloudflare_endpoint}" --profile=${cloudflare_profile} + ssh ${customsshkey} "${webuser}@${webhost}" aws s3 cp "${shadir}/${shafile}.asc" "s3://${cloudflare_bucket}/${r2dir}/${shafile}.asc" --endpoint="${cloudflare_endpoint}" --profile=${cloudflare_profile} - # Copy SHASUM256.txt.sig + # Copy SHASUMS256.txt.sig # shellcheck disable=SC2086,SC2029 - ssh ${customsshkey} "$webuser@$webhost" aws s3 cp "${shadir}/${shafile}.sig" "s3://${cloudflare_bucket}/${r2dir}/${shafile}.sig" --endpoint="${cloudflare_endpoint}" --profile=${cloudflare_profile} - + ssh ${customsshkey} "${webuser}@${webhost}" aws s3 cp "${shadir}/${shafile}.sig" "s3://${cloudflare_bucket}/${r2dir}/${shafile}.sig" --endpoint="${cloudflare_endpoint}" --profile=${cloudflare_profile} break fi done