Skip to content

Commit

Permalink
Merge pull request #657 from jamshale/adjust-auto-release-docs
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
jamshale authored Aug 14, 2024
2 parents 5bf5c6d + 6dd06e4 commit c2fe1c1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ jobs:
# Update the RELEASES.md file with the release notes
# Remove the Plugin Release Status heading
sed -i '/# Plugin Release Status/d' RELEASES.md
# Add a marker for the insertion of the upgraded plugins section
body=$(printf '%s \n*' "${body}")
echo "$body" | cat - RELEASES.md > temp && mv temp RELEASES.md
Expand All @@ -352,7 +353,7 @@ jobs:
# Update the release notes with the upgraded plugins.
# For replacing with the sed command we need to double escape the newline and tab characters.
details=$(printf '\n### Plugins Upgraded For ACA-Py Release %s \n - ' "$release_version")
double_escape_details=$(printf '\\n### Plugins Upgraded For ACA-Py Release %s \\n*' "$release_version")
double_escape_details=$(printf '\\n### Plugins Upgraded For ACA-Py Release %s \\n - ' "$release_version")
# For replacing the first occurence of '*' with the details
count=${#upgraded_plugins[*]}
Expand All @@ -365,14 +366,16 @@ jobs:
double_escape_details=$(printf '%s %s \n' "$double_escape_details" "${upgraded_plugins[$count - 1]}")
# Replace the first occurence of '*' with the details
sed -i "0,/*/s// - $(printf '%s ' ${double_escape_details})/" RELEASES.md
sed -i "0,/*/s//$(printf '%s ' ${double_escape_details})/" RELEASES.md
# Replace the release version with the release tag
sed -i "0,/v$release_version/{s/v$release_version/v$tag_version/}" RELEASES.md
body=${body/v$release_version/v$tag_version}
# Add the heading for the Plugin Release Status and RELEASES.md
heading="# Plugin Release Status"
# Remove the * insertion marker from the body
body="${body//*}"
body=$(printf '%s\n%s' "${heading}" "${body}")
printf '%s\n%s\n' "${heading}" "$(cat RELEASES.md)" > RELEASES.md
Expand Down

0 comments on commit c2fe1c1

Please sign in to comment.