From ec7a4fbbb72a458f6c2ef0c9b9ff0295b2007f64 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Sun, 12 Jun 2022 01:25:48 +0200 Subject: [PATCH] Check if repo published before drop --- builder | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builder b/builder index f561fb4..39246a5 100755 --- a/builder +++ b/builder @@ -88,7 +88,9 @@ aptly repo add bashclub $build_dir/$deb_package.deb aptly snapshot create $datetime-bashclub from repo bashclub -aptly publish drop $(lsb_release -cs) debian > /dev/null 2&>1 +if [ $(aptly publish list -raw |wc -l) -gt 0 ]; then + aptly publish drop $(lsb_release -cs) debian +fi aptly publish snapshot -distribution="$(lsb_release -cs)" $datetime-bashclub debian