From 2316da0523e11dff1b0d9c532effaf63d0d02074 Mon Sep 17 00:00:00 2001
From: gabriel klawitter <gabreal@users.noreply.github.com>
Date: Tue, 14 Jul 2020 16:38:49 +0530
Subject: [PATCH] ci: fix subdirectory upload to s3 (#1398)

---
 polkadot/.gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/polkadot/.gitlab-ci.yml b/polkadot/.gitlab-ci.yml
index d0c057b32cd..5e0bf77eefe 100644
--- a/polkadot/.gitlab-ci.yml
+++ b/polkadot/.gitlab-ci.yml
@@ -253,8 +253,8 @@ publish-s3-release:
     - echo "uploading objects to https://${BUCKET}/${PREFIX}/${VERSION}"
     - aws s3 sync ./artifacts/ s3://${BUCKET}/${PREFIX}/${VERSION}/
     - echo "update objects at https://${BUCKET}/${PREFIX}/${EXTRATAG}"
-    - for file in ./artifacts/*; do
-      name="$(basename ${file})";
+    - find ./artifacts -type f | while read file; do
+      name="${file#./artifacts/}";
       aws s3api copy-object
         --copy-source ${BUCKET}/${PREFIX}/${VERSION}/${name}
         --bucket ${BUCKET} --key ${PREFIX}/${EXTRATAG}/${name};
-- 
GitLab