summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Mattsson <bjorn@sunet.se>2022-11-18 08:39:22 +0100
committerBjörn Mattsson <bjorn@sunet.se>2022-11-18 08:39:22 +0100
commit65081e7eba296b4ba54a8ae6c9ce4dc9c206ea7e (patch)
tree41c1530e3ef66f3a03c9df244a4ca7b123d62bc9
parenta7a75d1b1891d0cdda9aa7eeda26a1f0d9e99dad (diff)
Added new dirs for import / removal
-rw-r--r--Makefile.validate13
-rwxr-xr-xscripts/update-and-validate.sh2
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