Skip to content

Commit 4fb98cc

Browse files
committed
fix dep version
1 parent c8bb02a commit 4fb98cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/release-source.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,9 @@ jobs:
141141
# Check for dependencies and update version if the dependency name matches a folder name
142142
if grep -q "dependencies:" "$dir/Chart.yaml"; then \
143143
echo "Dependencies found in $dir/Chart.yaml"; \
144-
dependency_name=$(grep -A1 "dependencies:" "$dir/Chart.yaml" | grep "name:" | awk '{print $2}'); \
145-
echo "Dependency name: $dependency_name"; \
144+
# Extract the correct dependency name (fixing multiline grep to handle proper yaml formatting)
145+
dependency_name=$(awk '/dependencies:/ { getline; print $2 }' "$dir/Chart.yaml"); \
146+
echo "Extracted dependency name: $dependency_name"; \
146147
if [ -d "$dependency_name" ]; then \
147148
echo "Folder $dependency_name exists"; \
148149
if [ "$dependency_name" == "$dir" ]; then \
@@ -172,6 +173,7 @@ jobs:
172173
echo "No subcharts directory found in $folder. Skipping subchart version update."; \
173174
fi; \
174175
done
176+
175177
git add .
176178
- name: update imageTag and repository_tag in values files
177179
if: ${{ inputs.is_helm_chart == true }}

0 commit comments

Comments
 (0)