summaryrefslogtreecommitdiff
path: root/Makefile
blob: 35f2896915caa16bfa25072d0a6eb70c58d8289d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
MXML=$(shell find . -type f -name "*.xml")

tag: commit
	./scripts/bump-tag

update: update-git
	./scripts/verify-tag && rsync -avz --delete Shibboleth-IdP Shibboleth-SP /opt/swamid-entity-configurations/
	./scripts/build-adfstoolkit-federation-defaults.sh

update-git:
	git checkout main && git reset --hard && git pull

test:	schematest
schematest:
	@fail=false ; for x in $(MXML); do test=`xmllint --xinclude --nowarning --noout --path schema --schema schema.xsd $$x 2>&1`; rc=$$?; echo $$test | sed 's/fails to validate/&/;s/validates/&/'; if [ $$rc -gt 0 ]; then fail=true ; fi; done ; if $$fail ; then exit 1 ; fi

commit: schematest
	@git diff --color || true
	@echo ; echo -n "Run 'git commit -av'? [Y/n/skip] " ; read x ; case $$x in "Y"|"y"|"") git commit -av ;; s|skip) ;; *) exit 1 ;; esac
	@git status -u
	@echo "Checking for not files not staged for yet commit" ; if git status --porcelain --ignored | awk '{print $$2}' | egrep "^Shibboleth-|^schema|^scripts" | sed 's/^/  /' | grep . ; then echo "There are files not staged for commit, aborting" ; exit 1 ; fi