|
|
@@ -25,13 +25,19 @@ Rebuild the manifest by hand from the release's own files when a fully uploaded
|
|
|
|
|
|
Before you start, make sure no `sign-windows` or `sign-macos` job is running or queued for the release. The manual commands are outside the jobs' concurrency group, so a job that updates `checksums.txt` while they run would have its lines overwritten.
|
|
|
|
|
|
-The commands run in a subshell that stops at the first error, so a failed download or hash never uploads a partial manifest:
|
|
|
+The commands run in a subshell that stops at the first error, so a failed download or hash never uploads a partial manifest. They also stop if any asset other than `checksums.txt` is not fully uploaded, because hashing a partial file would publish a checksum for the wrong bytes. Upload that asset again, or delete it with `gh release delete-asset`, then run the commands again. A signed file deleted here is uploaded again by the re-run.
|
|
|
|
|
|
[source,bash]
|
|
|
----
|
|
|
(
|
|
|
set -euo pipefail
|
|
|
tag=<tag>
|
|
|
+ incomplete="$(gh release view "${tag}" --repo OliveTin/OliveTin --json assets \
|
|
|
+ --jq '.assets[] | select(.name != "checksums.txt" and .state != "uploaded") | .name')"
|
|
|
+ if [[ -n "${incomplete}" ]]; then
|
|
|
+ echo "Not fully uploaded: ${incomplete}" >&2
|
|
|
+ exit 1
|
|
|
+ fi
|
|
|
workdir="$(mktemp -d)"
|
|
|
mkdir "${workdir}/assets"
|
|
|
gh release download "${tag}" --repo OliveTin/OliveTin --dir "${workdir}/assets"
|