diff options
-rw-r--r-- | Makefile.validate | 13 | ||||
-rwxr-xr-x | scripts/update-and-validate.sh | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/Makefile.validate b/Makefile.validate index 22d487b9..cc4848bc 100644 --- a/Makefile.validate +++ b/Makefile.validate @@ -1,7 +1,16 @@ -VALIDATEXML=$(patsubst swamid-2.0/%.xml,.time/%.validate,$(wildcard swamid-2.0/*.xml)) +EDUGAIN=$(patsubst swamid-edugain/%.xml,.time/%.validate,$(wildcard swamid-edugain/*.xml)) +SWAMDI20=$(patsubst swamid-2.0/%.xml,.time/%.validate,$(wildcard swamid-2.0/*.xml)) +TESTING=$(patsubst swamid-testing/%.xml,.time/%.validate,$(wildcard swamid-testing/*.xml)) all: validate -validate: $(VALIDATEXML) +validate: $(EDUGAIN) $(SWAMDI20) $(TESTING) + +.time/%.validate: swamid-edugain/%.xml + @docker exec swamid-metadata-sp /var/www/scripts/importXML.bash /opt/metadata/$< Prod | grep -v "Import -> Added to db" > $@ + .time/%.validate: swamid-2.0/%.xml @docker exec swamid-metadata-sp /var/www/scripts/importXML.bash /opt/metadata/$< Prod | grep -v "Import -> Added to db" > $@ + +.time/%.validate: swamid-testing/%.xml + @docker exec swamid-metadata-sp /var/www/scripts/importXML.bash /opt/metadata/$< Prod | grep -v "Import -> Added to db" > $@ diff --git a/scripts/update-and-validate.sh b/scripts/update-and-validate.sh index cec59729..07057918 100755 --- a/scripts/update-and-validate.sh +++ b/scripts/update-and-validate.sh @@ -7,7 +7,7 @@ update() git pull -q || return $? # Remove old entitys from DB - ls swamid-2.0/*.xml | sed 's@swamid-2.0/\(.*\).xml@.time/\1.validate@' > /tmp/$$.xml + ls swamid-edugain/*.xml swamid-2.0/*.xml swamid-testing/*.xml | sed 's@swamid-.*/\(.*\).xml@.time/\1.validate@' | sort > /tmp/$$.xml ls .time/*.validate > /tmp/$$.time comm -13 /tmp/$$.xml /tmp/$$.time | while read file; do docker exec swamid-metadata-sp /var/www/scripts/removeEntity.bash /opt/metadata/$file |