Skip to content

Commit

Permalink
SGB-270 Fixes upload_chart script
Browse files Browse the repository at this point in the history
  • Loading branch information
davividal committed Jan 15, 2025
1 parent 8247302 commit c498e40
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .cirrus/upload_chart.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -euo pipefail
set -xeuo pipefail

: "${ARTIFACTORY_URL:?}"
: "${ARTIFACTORY_ACCESS_TOKEN:?}"
Expand All @@ -20,9 +20,11 @@ fi
find_charts=$(find "${CIRRUS_WORKING_DIR}" -maxdepth 1 -name "${NAME_GLOB}" -type f -exec basename "{}" ";" || exit 1)

CHART_TO_UPLOAD=()
while IFS= read -r chart; do
CHART_TO_UPLOAD+=("${chart}")
done <<< "${find_charts}"
if [[ -n "${find_charts}" ]]; then
while IFS= read -r chart; do
CHART_TO_UPLOAD+=("${chart}")
done <<< "${find_charts}"
fi

if [[ ${#CHART_TO_UPLOAD[@]} -eq 0 ]]; then
echo "No charts found to upload."
Expand Down

0 comments on commit c498e40

Please sign in to comment.