From: "Florian Schmaus" <flow@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] data/api:master commit in: files/overlays/, .github/workflows/
Date: Tue, 21 Mar 2023 12:53:38 +0000 (UTC) [thread overview]
Message-ID: <1679402893.1d9c0429f4f38af6a34f3dfb66365502ecff2971.flow@gentoo> (raw)
commit: 1d9c0429f4f38af6a34f3dfb66365502ecff2971
Author: Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 21 12:47:59 2023 +0000
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Mar 21 12:48:13 2023 +0000
URL: https://gitweb.gentoo.org/data/api.git/commit/?id=1d9c0429
overlays: check XML style
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
.github/workflows/ci.yml | 2 +-
files/overlays/.gitignore | 4 +++-
files/overlays/Makefile | 14 +++++++++++++-
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index dd299ab..d2050f1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -9,7 +9,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
- sudo apt install libxml2-utils
+ sudo apt install libxml2-utils xmlstarlet
- uses: actions/setup-python@v4
with:
python-version: '3.x'
diff --git a/files/overlays/.gitignore b/files/overlays/.gitignore
index 9a4955a..1281487 100644
--- a/files/overlays/.gitignore
+++ b/files/overlays/.gitignore
@@ -1,5 +1,7 @@
+/.repositories-check-successful
/.repositories-dtd-valid
+/.repositories-expected-format.xml
+/.repositories-style-ok
/.repositories-xsd-valid
-/.repositories-check-successful
/repositories.dtd
/repositories.xsd
diff --git a/files/overlays/Makefile b/files/overlays/Makefile
index f9250f2..e06d4c7 100644
--- a/files/overlays/Makefile
+++ b/files/overlays/Makefile
@@ -1,5 +1,5 @@
.PHONY: check
-check: .repositories-dtd-valid .repositories-xsd-valid .repositories-check-successful
+check: .repositories-dtd-valid .repositories-xsd-valid .repositories-check-successful .repositories-style-ok
# Check repositories.xml against the Document Type Definition (DTD).
.repositories-dtd-valid: repositories.xml repositories.dtd
@@ -31,3 +31,15 @@ endif
.repositories-check-successful: repositories.xml
../../bin/repositories-checker.py - $^
touch $@
+
+.repositories-expected-format.xml: repositories.xml
+ xmlstarlet fo $^ > $@
+
+.ONESHELL:
+.repositories-style-ok: SHELL = /bin/bash
+.repositories-style-ok: .repositories-expected-format.xml
+ if ! cmp -s repositories.xml $^; then
+ diff -u repositories.xml $^
+ exit 1
+ fi
+ touch $@
reply other threads:[~2023-03-21 12:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1679402893.1d9c0429f4f38af6a34f3dfb66365502ecff2971.flow@gentoo \
--to=flow@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox