From ef3753622244c55b246fb952868c3ea7aac4869a Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sun, 20 Jul 2014 20:58:29 -0700 Subject: Add XSD/indent checking --- .travis.yml | 17 +++++++++++ Makefile | 25 ++++++++++++++++ graphics/particles/crit.particle.xml | 2 +- graphics/sprites/model/male.xml | 2 +- graphics/sprites/monsters/skeleton.xml | 2 +- graphics/sprites/monsters/zombie.xml | 2 +- items.xsd | 41 -------------------------- items.xsl | 53 ---------------------------------- 8 files changed, 46 insertions(+), 98 deletions(-) create mode 100644 .travis.yml create mode 100644 Makefile delete mode 100644 items.xsd delete mode 100644 items.xsl diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..07a8042d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +notifications: + email: + on_success: changed + on_failure: always + irc: + channels: "chat.freenode.net#themanaworld-dev" + on_success: always + on_failure: always + use_notice: true + +install: + - pushd .. + - git clone --depth 1 git://github.com/themanaworld/tmw-tools.git tools + - popd + +script: + - make check diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..2a66f887 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +# for pipefail +SHELL=/bin/bash +.SECONDARY: +.DELETE_ON_ERROR: + +check: + git diff --exit-code + +XMLS = $(shell find -type f -name '*.xml') +check: check-xml +check-xml: $(patsubst %.xml,%.xml.ok,${XMLS}) + find -name '*.xml.ok' -delete + find -name '*.xml.out' -delete +%.xml.ok: %.xml %.xml.out + diff $^ + touch $@ +%.xml.out: %.xml + set -e -o pipefail; \ + xmllint --format --schema tools/tmw.xsd $< 2>&1 > $@ | grep -v 'Skipping import of schema' + +check: xsd +xsd: + xmllint --format --schema tools/dl/XMLSchema.xsd tools/tmw.xsd > tmw-formatted.xsd + diff tools/tmw.xsd tmw-formatted.xsd + rm tmw-formatted.xsd diff --git a/graphics/particles/crit.particle.xml b/graphics/particles/crit.particle.xml index f28cddb6..7f534477 100644 --- a/graphics/particles/crit.particle.xml +++ b/graphics/particles/crit.particle.xml @@ -21,7 +21,7 @@ An explosion of white particles. - + diff --git a/graphics/sprites/model/male.xml b/graphics/sprites/model/male.xml index 36674ad3..7102f600 100644 --- a/graphics/sprites/model/male.xml +++ b/graphics/sprites/model/male.xml @@ -1,5 +1,5 @@ - + diff --git a/graphics/sprites/monsters/skeleton.xml b/graphics/sprites/monsters/skeleton.xml index 4220a551..b047cf01 100644 --- a/graphics/sprites/monsters/skeleton.xml +++ b/graphics/sprites/monsters/skeleton.xml @@ -1,5 +1,5 @@ - + diff --git a/graphics/sprites/monsters/zombie.xml b/graphics/sprites/monsters/zombie.xml index 8ccd4672..19738d82 100644 --- a/graphics/sprites/monsters/zombie.xml +++ b/graphics/sprites/monsters/zombie.xml @@ -1,5 +1,5 @@ - + diff --git a/items.xsd b/items.xsd deleted file mode 100644 index 2fb6b667..00000000 --- a/items.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/items.xsl b/items.xsl deleted file mode 100644 index acf9e7d8..00000000 --- a/items.xsl +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - -graphics/items - - - - -

Item Database

- - - - -

- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
ID: Type: Skill: Weight:
Description:
Effect:
-

-
-
- - -
-
\ No newline at end of file -- cgit v1.2.3-70-g09d2