Skip to content

Commit 1ef5883

Browse files
authored
Upload versioned products to different paths for cloud connector (#1888)
* Upload versioned products to different paths for cloud connector * Only upload version folder
1 parent f297243 commit 1ef5883

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,14 @@ jobs:
202202
then
203203
versioned_builds=($(find . -type d -regex ".*[0-9-]" -maxdepth 1 | sed -E 's/^.\///'))
204204
for versioned_build in "${versioned_builds[@]}"; do
205-
product=$(awk 'BEGIN{FS=OFS="-"}{NF--; print}' <<< $versioned_build)
205+
read product version <<< "$(awk -F- '{print $1 " " $2}' <<<"$versioned_build")"
206+
206207
if [[ "${product}" == "redis-data-integration" ]]; then
207208
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}" "gs://${BUCKET}/${versioned_build}/integrate/${product}"
208-
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}" "gs://${BUCKET}/docs/${versioned_build}/integrate/${product}"
209+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}/${version}" "gs://${BUCKET}/docs/$bucket_path/integrate/${product}/${version}"
209210
else
210211
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${versioned_build}/operate/${product}"
211-
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/docs/${versioned_build}/operate/${product}"
212+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}/${version}" "gs://${BUCKET}/docs/$bucket_path/operate/${product}/${version}"
212213
fi
213214
done
214215
fi

0 commit comments

Comments
 (0)