Skip to content

Commit 67a4c3a

Browse files
fix(update-flathub): do not add changelog (#712)
1 parent 4d1c563 commit 67a4c3a

1 file changed

Lines changed: 0 additions & 34 deletions

File tree

.github/workflows/__call-update-flathub-repo.yml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -136,40 +136,6 @@ jobs:
136136
"https://raw.githubusercontent.com/LizardByte/.github/master/.github/ISSUE_TEMPLATE/config.yml" \
137137
".github/ISSUE_TEMPLATE/config.yml"
138138
139-
- name: Update metainfo.xml
140-
id: update_metainfo
141-
if: >-
142-
steps.check-label.outputs.hasTopic == 'true' &&
143-
steps.check-release.outputs.isLatestRelease == 'true'
144-
env:
145-
CHANGELOG: ${{ github.event.release.body }}
146-
run: |
147-
# Set the metainfo file and placeholder generated by the release asset.
148-
xml_file="flathub/${{ env.FLATHUB_PKG }}/${{ env.FLATHUB_PKG }}.metainfo.xml"
149-
placeholder="<!-- changelog -->"
150-
151-
# Treat replacement text literally during Bash parameter substitutions.
152-
shopt -u patsub_replacement 2>/dev/null || true
153-
154-
# Escape XML-sensitive characters from the release body.
155-
changelog="${CHANGELOG:-}"
156-
changelog="${changelog//&/&amp;}"
157-
changelog="${changelog//</&lt;}"
158-
changelog="${changelog//>/&gt;}"
159-
160-
# Read the full metainfo file, preserving newlines.
161-
IFS= read -r -d '' contents < "$xml_file" || true
162-
163-
# Fail clearly if the generated metainfo file no longer has the expected marker.
164-
if [[ "$contents" != *"$placeholder"* ]]; then
165-
echo "$placeholder not found in $xml_file"
166-
exit 1
167-
fi
168-
169-
# Replace the placeholder with the escaped changelog and write the file back.
170-
contents="${contents//$placeholder/$changelog}"
171-
printf '%s' "$contents" > "$xml_file"
172-
173139
- name: Update submodule
174140
if: >-
175141
steps.check-label.outputs.hasTopic == 'true' &&

0 commit comments

Comments
 (0)