From 82bf7b95dfcbe84959072fb9c850204eacfa4126 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Fri, 16 Apr 2021 17:24:10 +0100
Subject: [PATCH] Allow setting the registry hostname

---
 contrib/update.sh          | 3 ++-
 debian/gitlab-deps.default | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/contrib/update.sh b/contrib/update.sh
index db3a4b3..5aaa71d 100755
--- a/contrib/update.sh
+++ b/contrib/update.sh
@@ -24,7 +24,8 @@ trap "rm -f $tmp_file 2>/dev/null" EXIT
 gitlab-deps list-projects $opts \
     | egrep "${PROJECT_REGEXP:-.*}" \
     | gitlab-deps deps $opts \
-                  > $tmp_file
+        ${GITLAB_REGISTRY_HOSTNAME:+--registry=${GITLAB_REGISTRY_HOSTNAME}} \
+        > $tmp_file
 
 if ! cmp --quiet $tmp_file $deps_file; then
     mv -f $tmp_file $deps_file
diff --git a/debian/gitlab-deps.default b/debian/gitlab-deps.default
index 8c294d2..5c0acc2 100644
--- a/debian/gitlab-deps.default
+++ b/debian/gitlab-deps.default
@@ -1,6 +1,9 @@
 # Set to the public URL of your Gitlab repository.
 GITLAB_URL=
 
+# Set to the registry hostname (https:// is assumed) if necessary.
+GITLAB_REGISTRY_HOSTNAME=
+
 # File with the authorization token.
 GITLAB_TOKEN_FILE=/var/lib/gitlab-deps/auth_token
 
-- 
GitLab