Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 56df127

Browse filesBrowse files
targosRafaelGSS
authored andcommitted
build,tools: simplify upload of shasum signatures
Use the same prompt for uploads to the web host and Cloudflare R2. PR-URL: #53892 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent b26bcd3 commit 56df127
Copy full SHA for 56df127

1 file changed

+9-20Lines changed: 9 additions & 20 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tools/release.sh‎

Copy file name to clipboardExpand all lines: tools/release.sh
+9-20Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.