From 86e446c027b15e95bb4cadb6aeea09e90814c15e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 19 Oct 2020 18:32:58 +0100 Subject: Support extending the S3 publish hook To allow doing things with the nar/narinfo files before they're deleted. --- guix-build-coordinator/hooks.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/guix-build-coordinator/hooks.scm b/guix-build-coordinator/hooks.scm index f4c95f6..0b41e11 100644 --- a/guix-build-coordinator/hooks.scm +++ b/guix-build-coordinator/hooks.scm @@ -141,7 +141,8 @@ #:key (command-line-arguments '()) (public-key (read-file-sexp %public-key-file)) - (private-key (read-file-sexp %private-key-file))) + (private-key (read-file-sexp %private-key-file)) + post-publish-hook) (define (s3-file-exists? name) (if (null? (retry-on-error @@ -185,6 +186,11 @@ #:times 6 #:delay 20)) + (when post-publish-hook + (post-publish-hook directory + narinfo-filename + nar-filename)) + (delete-file (string-append directory "/" narinfo-filename)) (delete-file (string-append directory "/" nar-filename)))))) -- cgit v1.2.3