Files
gimp/desktop/test-appdata.sh
Jehan 9368c8abdd desktop: fix AppStream validation with TODO release date.
As I recall, this is something we in fact used to have in gimp-2-10
branch and which we lost when switching from appstream-util to
appstreamcli validation tool (the later is now recommended, but it's
also less featureful, they don't even have a relax test!). So that was a
regression in the build system.

Note that it's not just not to have to put a date too early in our
AppStream metadata, but it's also that this way, we won't forget to
update it upon release (hence shipping with a wrong release data in
metadata). Indeed, when building a non-release version, date="TODO" will
pass the test, yet moving on to a point release version, the validation
test will now fail on a TODO date.
2024-08-29 23:19:58 +02:00

15 lines
352 B
Bash
Executable File

#!/bin/sh
cd $GIMP_TESTING_BUILDDIR
if [ $GIMP_RELEASE -eq 1 ]; then
appstreamcli validate org.gimp.GIMP.appdata.xml
exit $?
else
APPDATA=`mktemp org.gimp.GIMP.appdata.XXX.xml`
sed "s/date=\"TODO\"/date=\"`date --iso-8601`\"/" org.gimp.GIMP.appdata.xml > $APPDATA
appstreamcli validate $APPDATA
success=$?
rm $APPDATA
exit $success
fi