File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -163,15 +163,14 @@ jobs:
163163 --nopush)
164164 echo "$releaseDefinitionOutput"
165165
166- # Extract the path of the generated file from the output
167- releaseDefinitionPath=$( echo "$releaseDefinitionOutput " | grep -oP 'Committed File \K[^ ]+ ' | head -1)
166+ # Extract YAML content (lines starting with a space) and remove ANSI color codes
167+ echo "$ReleaseDefinitionOutput " | sed 's/\x1b\[[0-9;]*m//g ' | awk '/^ / {print}' > "releases/${RELEASE_NAME}/${RELEASE_NAME}.yml"
168168
169- # Check if the path was found and the file exists, then copy it
170- if [ -n "$releaseDefinitionPath" ] && [ -f "$releaseDefinitionPath" ]; then
171- cp "$releaseDefinitionPath" "releases/${RELEASE_NAME}"
172- echo "Release definition file copied to releases/${RELEASE_NAME}"
169+ # Verify the file was created and has content
170+ if [ -s "releases/${RELEASE_NAME}/${RELEASE_NAME}.yml" ]; then
171+ echo "Release definition file created at releases/${RELEASE_NAME}/${RELEASE_NAME}.yml"
173172 else
174- echo "::error::Failed to find or access the generated release definition file at '$releaseDefinitionPath' ."
173+ echo "::error::Failed to create release definition file."
175174 exit 1
176175 fi
177176 echo "::endgroup::"
You can’t perform that action at this time.
0 commit comments