non environment text must be only once in otherwise the flatpak appdata test will fail. So make the description to be and add paragraphs to the others

This commit is contained in:
Martin Marmsoler 2022-06-09 10:27:16 +02:00
parent 051a140830
commit f6fff44816

View File

@ -1,6 +1,9 @@
# add release notes to the appdata file
file(READ "${CHANGELOG_HTML}" HTML_CHANGELOGS)
string(REGEX REPLACE "<h4>([A-Fa-f0-9]*)<\\/h4>" "\\1" RELEASES ${HTML_CHANGELOGS}) # h4 is unknow to appdata
# it is not allowed to have multiple texts without being in an environment
# So the description will be used for it
string(REGEX REPLACE "<p>([^<]*)<\\/p>" "\\1" RELEASES ${HTML_CHANGELOGS}) # remove paragraph environment
string(REGEX REPLACE "<h4>([A-Za-z0-9]*)<\\/h4>" "<p>\\1</p>" RELEASES ${RELEASES}) # h4 is unknow to appdata so change it to a paragraph environment
string(REPLACE "\n" "\n\t" RELEASES ${RELEASES}) # add tabulator
string(REGEX REPLACE "<h3>(v[1-9]\\.[0-9]\\.[0-9]) - ([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])<\\/h3>" "<release version='\\1' date='\\2'>\n\t<description>" RELEASES ${RELEASES})
string(REGEX REPLACE "<hr \\/>" "</description>\n\t</release>" RELEASES ${RELEASES})