Skip to content

Commit a9990f2

Browse files
committed
fix: bedre print av fil og utbedre uthenting av yaml innhold
1 parent 04e932b commit a9990f2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/createRelease.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,16 @@ jobs:
8585
echo "$releaseDefinitionOutput"
8686
8787
# Extract YAML content (lines starting with a space) and remove ANSI color codes
88-
echo "$releaseDefinitionOutput" | sed 's/\x1b\[[0-9;]*m//g' | awk '/^ / {print}' > "releases/${RELEASE_NAME}/${RELEASE_NAME}.yml"
88+
echo "$ReleaseDefinitionOutput" \
89+
| sed 's/\x1b\[[0-9;]*m//g' +
90+
| awk '/^ release:/,/^[^ ]/' \
91+
| sed '$d' > "releases/${RELEASE_NAME}/${RELEASE_NAME}.yml"
8992
9093
# Verify the file was created and has content
9194
if [ -s "releases/${RELEASE_NAME}/${RELEASE_NAME}.yml" ]; then
9295
echo "Release definition file created at releases/${RELEASE_NAME}/${RELEASE_NAME}.yml"
93-
echo $(cat "releases/${RELEASE_NAME}/${RELEASE_NAME}.yml")
96+
echo "File content:"
97+
cat "releases/${RELEASE_NAME}/${RELEASE_NAME}.yml"
9498
else
9599
echo "::error::Failed to create release definition file."
96100
exit 1

0 commit comments

Comments
 (0)