| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3cdf94d commit a2d74f4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -138,7 +138,7 @@ sign() { | |||
| 138 | 138 | echo "" | |
| 139 | 139 | ||
| 140 | 140 | while true; do | |
| 141 | - printf "Upload files to %s? [y/n] " "$webhost" | ||
| 141 | + printf "Upload files to %s and Cloudflare R2? [y/n] " "$webhost" | ||
| 142 | 142 | yorn="" | |
| 143 | 143 | read -r yorn | |
| 144 | 144 | ||
@@ -147,37 +147,26 @@ sign() { | |||
| 147 | 147 | fi | |
| 148 | 148 | ||
| 149 | 149 | if [ "X${yorn}" = "Xy" ]; then | |
| 150 | + # Copy SHASUMS256.txt and its signatures to the web host: | ||
| 150 | 151 | # shellcheck disable=SC2086 | |
| 151 | 152 | scp ${customsshkey} "${tmpdir}/${shafile}" "${tmpdir}/${shafile}.asc" "${tmpdir}/${shafile}.sig" "${webuser}@${webhost}:${shadir}/" | |
| 152 | 153 | # shellcheck disable=SC2086,SC2029 | |
| 153 | 154 | ssh ${customsshkey} "${webuser}@${webhost}" chmod 644 "${shadir}/${shafile}.asc" "${shadir}/${shafile}.sig" | |
| 154 | - break | ||
| 155 | - fi | ||
| 156 | - done | ||
| 157 | 155 | ||
| 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. | ||
| 169 | 159 | ||
| 170 | 160 | # Remove /home/dist/ part | |
| 171 | 161 | r2dir=$(echo "$shadir" | cut -c 11-) | |
| 172 | 162 | ||
| 173 | - # Copy SHASUM256.txt.asc | ||
| 163 | + # Copy SHASUMS256.txt.asc | ||
| 174 | 164 | # 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} | ||
| 176 | 166 | ||
| 177 | - # Copy SHASUM256.txt.sig | ||
| 167 | + # Copy SHASUMS256.txt.sig | ||
| 178 | 168 | # 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} | ||
| 181 | 170 | break | |
| 182 | 171 | fi | |
| 183 | 172 | done | |
| Back | FazBrowse Home | New Git URL |
0 commit comments