File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,22 @@ true. If there's a SHA1 mismatch, signal an error."
216216 (store " distinfo-subscription-url"
217217 (distinfo-subscription-url distinfo))))))
218218
219+ (defun file-sha256 (file)
220+ (string-downcase
221+ (ironclad :byte-array-to-hex-string
222+ (ironclad :digest-file :sha256 file))))
223+
224+ (defun write-release-digests (dist output-file)
225+ (with-open-file (stream output-file :direction :output )
226+ (format stream " # key sha256~% " )
227+ (dolist (release (provided-releases dist))
228+ (let* ((file (ql-dist :local-archive-file release))
229+ (sha256 (file-sha256 file)))
230+ (format stream " release/~A ~A~% "
231+ (ql-dist :name release)
232+ sha256))))
233+ (probe-file output-file))
234+
219235(defun upload-distinfo (distinfo)
220236 (let ((sysindex #p " quicklisp-controller:tmp;systems.txt" )
221237 (relindex #p " quicklisp-controller:tmp;releases.txt" )
@@ -245,7 +261,8 @@ true. If there's a SHA1 mismatch, signal an error."
245261 (map-sources
246262 (lambda (source)
247263 (let ((tarball (ensure-cached-release-tarball source)))
248- (copy tarball #p " archives/" ))))))
264+ (copy tarball #p " archives/" ))))
265+ (write-release-digests (dist name) " digests.txt" )))
249266
250267(defun mail-mock-report ()
251268 (if *report-to-email*
You can’t perform that action at this time.
0 commit comments