Skip to content

Commit

Permalink
Update migrate-s3.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepstaylor committed Oct 21, 2024
1 parent 2fca804 commit 8905640
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/migrate-s3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ jobs:
prefixes=$(kubectl exec $SERVICE_POD_NAME -- aws s3api list-objects-v2 --bucket $SRC_BUCKET --delimiter '/' --query 'CommonPrefixes[*].Prefix' --output text)
# remove all spaces and put one comma between prefixes
cleaned_prefixes=$(echo $prefixes | tr ' ' ',')
cleaned_prefixes=$(echo $prefixes | tr -s '[:space:]' ',')
DIRS=""
IFS=','
for prefix in $cleaned_prefixes; do
DIR=$(kubectl exec $SERVICE_POD_NAME -- aws s3api list-objects-v2 --bucket $SRC_BUCKET --prefix "$prefix" --delimiter '/' --query 'CommonPrefixes[*].Prefix' --output text)
if [ -n "$DIR" ]; then
DIR=$(echo $DIR | tr ' ' ',')
DIR=$(echo $DIR | tr -s '[:space:]' ',')
DIRS="${DIRS}${DIR},"
fi
done
Expand Down

0 comments on commit 8905640

Please sign in to comment.