From ec8cd66f5fed43882d35fbf5e81ad73b9bd1e11a Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 22 Oct 2020 12:09:46 +0100 Subject: Move the post-publish-behaviour inside the s3 publish hook So that it'll run only if the narinfo on S3 is changed, because this should prevent it running when the hook wouldn't change the narinfo on S3, because one already exists. --- guix-build-coordinator/hooks.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/guix-build-coordinator/hooks.scm b/guix-build-coordinator/hooks.scm index 0b41e11..8339b4f 100644 --- a/guix-build-coordinator/hooks.scm +++ b/guix-build-coordinator/hooks.scm @@ -176,6 +176,12 @@ command-line-arguments)) #:times 6 #:delay 20) + + (when post-publish-hook + (post-publish-hook directory + narinfo-filename + nar-filename)) + (retry-on-error (lambda () (s3-cp s3-bucket @@ -186,11 +192,6 @@ #: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