.PHONY: help mrproper all install clean local lint prepare validate build test clear post-test deploy deploy-full SITENAME = cv.juancanham.com hackmyresume=./node_modules/.bin/hackmyresume linkchecker=linkchecker -f .linkcheckerrc --check-extern help: @echo 'Targets:' @echo ' * all [clean install deploy-full]' @echo ' * local [lint validate build test]' @echo ' * deploy - does not clear the CDN' @echo ' * deploy-full [local deploy clear post-test]' @echo ' * mrproper - removes node_modues' all: clean install deploy-full local: lint validate build test deploy-full: deploy clear post-test mrproper: rm -rf ./node_modules/ install: pip install -r requirements.txt npm install clean: rm -r dist/* || true lint: shellcheck *.sh deploy/*.sh deploy/shared-functions spelling=$$(aspell --ignore=4 --home-dir=. list < resume.yaml) ; \ if [ -n "$$spelling" ] ; then echo spelling errors found: $$spelling ; exit 1 ; fi yamllint . black *.py pylint *.py cfn-lint deploy/cloudformation/* prepare: clean resume.yaml mkdir -p dist/images/ ./transform.py ./generate_qrcode.py "https://$(SITENAME)" QR cp -r images dist/ rm dist/images/*~ || true validate: prepare $(hackmyresume) validate dist/resume.json $(hackmyresume) analyze dist/resume.json build: prepare ./build.sh test: $(linkchecker) dist/resume.html deploy: ./deploy/deploy-cloudformation.sh $(SITENAME) aws s3 sync --delete dist/ s3://$(subst .,-,$(SITENAME)) clear: ./deploy/clear-cache.sh $(SITENAME) post-test: $(linkchecker) https://$(SITENAME) wget http://${SITENAME} -O /dev/null