From 6ee2ad69d18ebe175a57bd9bce4ea48d55f8cfdf Mon Sep 17 00:00:00 2001
From: Amir MOHAMMADI <amir.mohammadi@idiap.ch>
Date: Thu, 21 Sep 2017 18:14:56 +0200
Subject: [PATCH] make url paths relative to channel

---
 gitlab/channel_support.py | 1 +
 gitlab/deploy.sh          | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/gitlab/channel_support.py b/gitlab/channel_support.py
index 7e32924..e69ec21 100644
--- a/gitlab/channel_support.py
+++ b/gitlab/channel_support.py
@@ -18,6 +18,7 @@ def main(channel_url, name, version, py_ver, get_urls=False):
             if match and match.group() == 'py{}'.format(py_ver):
                 build_number = max(build_number, dist.build_number + 1)
                 urls.append(index[dist].url)
+    urls = [url.replace(channel_url, '') for url in urls]
     return build_number, urls
 
 
diff --git a/gitlab/deploy.sh b/gitlab/deploy.sh
index 90f340d..a143eaf 100755
--- a/gitlab/deploy.sh
+++ b/gitlab/deploy.sh
@@ -24,7 +24,7 @@ done
 if [ -z "${CI_COMMIT_TAG}" ]; then #beta
     for urls in "_ci/*/*/build_number.txt"; do
         for url in `tail -n +2 $urls`; do
-            dav_delete ${url/$DOCSERVER/}
+            dav_delete ${url}
         done
     done
 fi
-- 
GitLab