[gimp] desktop: check that no remaining TODOs are in appdata file.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] desktop: check that no remaining TODOs are in appdata file.
- Date: Wed, 23 Jan 2019 22:50:59 +0000 (UTC)
commit c0fed5afd6d1bfae9852f6d1694a426cb80d9557
Author: Jehan <jehan girinstud io>
Date: Wed Jan 23 23:42:17 2019 +0100
desktop: check that no remaining TODOs are in appdata file.
Before each release, we prepare now a <release> tag. Unfortunately some
details are not always well known for sure in advance, in particular the
date of release (plans are made to be broken!), and also the release
news URL (since the date is in the URL). So I usually leave them as TODO
and until now, I never forgot to update them just before release. But
there is always the risk of forgetting.
Now the test for the appdata files will also look for remaining "TODO"
in the file if and only if the micro version is even (which means it's a
release). So we won't ever forget to update the file as long as we run
`make check` on the last commit (which we always do obviously).
configure.ac | 1 +
desktop/Makefile.am | 6 ++++--
desktop/test-appdata.sh | 6 ------
desktop/test-appdata.sh.in | 15 +++++++++++++++
4 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 19b16c781c..ca9ff18725 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2933,6 +2933,7 @@ desktop/Makefile
desktop/gimp-data-extras.metainfo.xml.in
desktop/gimp.desktop.in
desktop/org.gimp.GIMP.appdata.xml.in
+desktop/test-appdata.sh
etc/Makefile
etc/gimprc
m4macros/Makefile
diff --git a/desktop/Makefile.am b/desktop/Makefile.am
index bf29ab7192..520dcfe68e 100644
--- a/desktop/Makefile.am
+++ b/desktop/Makefile.am
@@ -46,7 +46,7 @@ endif
EXTRA_DIST = \
$(appstream_in_files) \
- test-appdata.sh \
+ test-appdata.sh.in \
test-desktop.sh \
gimp.desktop.in.in \
16x16/gimp.png \
@@ -75,7 +75,9 @@ validate: gimp.desktop
dist-hook: validate
-TESTS_ENVIRONMENT = GIMP_TESTING_ABS_TOP_BUILDDIR=@abs_top_builddir@
+TESTS_ENVIRONMENT = \
+ chmod +x test-appdata.sh; \
+ GIMP_TESTING_ABS_TOP_BUILDDIR=@abs_top_builddir@
TESTS =
if HAVE_APPSTREAM_UTIL
diff --git a/desktop/test-appdata.sh.in b/desktop/test-appdata.sh.in
new file mode 100755
index 0000000000..733bcfcb9d
--- /dev/null
+++ b/desktop/test-appdata.sh.in
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# TODO: use validate-strict when the last errors for a strict validation
+# are fixed.
+appstream-util validate-relax ${GIMP_TESTING_ABS_TOP_BUILDDIR}/desktop/org.gimp.GIMP.appdata.xml && \
+appstream-util validate-relax ${GIMP_TESTING_ABS_TOP_BUILDDIR}/desktop/gimp-data-extras.metainfo.xml && \
+if [ $(expr @GIMP_MICRO_VERSION@ % 2) = 0 ]; then
+ grep TODO ${GIMP_TESTING_ABS_TOP_BUILDDIR}/desktop/org.gimp.GIMP.appdata.xml
+ if [ $? = 0 ]; then
+ echo "ERROR: stable version with remaining TODOs in appdata."
+ false
+ fi
+else
+ true
+fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]