Kaydet (Commit) 6e004cce authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Include <release> in Flatpak appdata.xml

...fixing <https://github.com/flathub/org.libreoffice.LibreOffice/issues/13>
"No version information".  This is only minimal release information (cf.
<https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#
tag-releases>), but is what is available directly in the build without
additional manual input.  Lack of either a date or timestamp attribute causes a
failure "org.libreoffice.LibreOffice.desktop: AppData problem: attribute-missing
: <release> has no timestamp", so include the current date in ISO 8601 format to
silence that.

It is assumed that the LIBO_VERSION_* variables will only contain numeric
values, so don't need to be encoded when included in an XML attribute.

Change-Id: I442a01d5093ab2621897685c3bc1eeda4ee08fa9
üst a377db06
...@@ -43,7 +43,7 @@ done ...@@ -43,7 +43,7 @@ done
## doesn't show more than five screenshots anyway, so restrict to one each from ## doesn't show more than five screenshots anyway, so restrict to one each from
## the five libreoffice-*.appdata.xml: Writer, Calc, Impress, Draw, Base): ## the five libreoffice-*.appdata.xml: Writer, Calc, Impress, Draw, Base):
mkdir /app/share/appdata mkdir /app/share/appdata
cat <<\EOF >/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml cat <<EOF >/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<component type="desktop"> <component type="desktop">
<id>org.libreoffice.LibreOffice.desktop</id> <id>org.libreoffice.LibreOffice.desktop</id>
...@@ -98,6 +98,11 @@ cat <<\EOF >/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml ...@@ -98,6 +98,11 @@ cat <<\EOF >/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml
<kudo>ModernToolkit</kudo> <kudo>ModernToolkit</kudo>
<kudo>UserDocs</kudo> <kudo>UserDocs</kudo>
</kudos> </kudos>
<releases>
<release
version="${LIBO_VERSION_MAJOR?}.${LIBO_VERSION_MINOR?}.${LIBO_VERSION_MICRO?}.${LIBO_VERSION_PATCH?}"
date="$(date +%Y-%m-%d)"/>
</releases>
</component> </component>
EOF EOF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment