From d6b6f1ba160694653cd954820f60bb52ea162cfb Mon Sep 17 00:00:00 2001
From: Johannes Meyer <johannes.meyer@icinga.com>
Date: Mon, 17 Aug 2020 14:44:21 +0200
Subject: [PATCH] icinga-build-deb-source: Expect a tarball if
 `USCAN_DOWNLOAD=no`

---
 icinga-build-deb-source | 5 +++++
 icinga-build-docker     | 1 +
 2 files changed, 6 insertions(+)

diff --git a/icinga-build-deb-source b/icinga-build-deb-source
index 050a651..481f18d 100755
--- a/icinga-build-deb-source
+++ b/icinga-build-deb-source
@@ -44,6 +44,11 @@ if [ "${ICINGA_BUILD_TYPE}" == "release" ] ; then
   echo "[ Downloading current tarball with uscan ]"
   (
     set -ex
+
+    if [ "${USCAN_DOWNLOAD}" == "no" ]; then
+      cp ./*.tar* "${BUILDDIR}/"
+    fi
+
     cd "${BUILDDIR}/${ICINGA_BUILD_PROJECT}"
     run-retry-timeout uscan --download-current-version --verbose
   )
diff --git a/icinga-build-docker b/icinga-build-docker
index 8832974..338482d 100755
--- a/icinga-build-docker
+++ b/icinga-build-docker
@@ -48,6 +48,7 @@ trap 'rm -f ${env_file}' EXIT INT
 env | grep -e ^ICINGA > "${env_file}" || true
 env | grep -e ^APTLY >> "${env_file}" || true
 env | grep -e ^CI_ >> "${env_file}" || true
+env | grep -e ^USCAN_ >> "${env_file}" || true
 
 echo "[ Running build in Docker ]"
 set -ex
-- 
GitLab