<commit_before>all:
	@cat Makefile | grep : | grep -v PHONY | grep -v @ | sed 's/:/ /' | awk '{print $$1}' | sort

#-------------------------------------------------------------------------------

.PHONY: install
install:
	composer self-update
	composer install -o

.PHONY: test
test:
	php bin/phpunit

#-------------------------------------------------------------------------------

.PHONY: docs
docs:
	php bin/sami.php update docs/sami-config.php -v

.PHONY: pushdocs
pushdocs: docs
	rm -Rf /tmp/gh-pages
	git clone <EMAIL>:wepay/signer-php.git --branch gh-pages --single-branch /tmp/gh-pages
	cp -Rf ./docs/api-build/ /tmp/gh-pages/
	cd /tmp/gh-pages/ && git add . && git commit -a -m "Automated commit on $$(date)" && git push origin gh-pages

#-------------------------------------------------------------------------------

.PHONY: tag
tag:
	@ if [ $$(git status -s -uall | wc -l) != 0 ]; then echo 'ERROR: Git workspace must be clean.'; exit 1; fi;

	@echo "This release will be tagged as: $$(cat ./VERSION)"
	@echo "This version should match your release. If it doesn't, re-run 'make version'."
	@echo "---------------------------------------------------------------------"
	@read -p "Press any key to continue, or press Control+C to cancel. " x;

	@echo " "
	@chag update $$(cat ./VERSION)
	@echo " "<commit_msg>Updated the Makefile to make docs simpler.<commit_after>all:
	@cat Makefile | grep : | grep -v PHONY | grep -v @ | sed 's/:/ /' | awk '{print $$1}' | sort

#-------------------------------------------------------------------------------

.PHONY: install
install:
	composer self-update
	composer install -o

.PHONY: test
test:
	php bin/phpunit

#-------------------------------------------------------------------------------

.PHONY: docs
docs:
	@ echo "Building API reference…"
	php bin/sami.php update docs/sami-config.php -v

	@ echo "Building prose documentation…"
	cd docs && make html

.PHONY: showdocs
showdocs:
	open docs/api-build/master/index.html
	open docs/_build/html/index.html

.PHONY: pushdocs
pushdocs: docs
	rm -Rf /tmp/gh-pages
	git clone <EMAIL>@github.com:wepay/signer-php.git --branch gh-pages --single-branch /tmp/gh-pages
	cp -Rf ./docs/api-build/ /tmp/gh-pages/
	cd /tmp/gh-pages/ && git add . && git commit -a -m "Automated commit on $$(date)" && git push origin gh-pages

	@ echo " "
	@ echo "Prose documentation is automatically built by the Read The Docs service. https://readthedocs.org/projects/wepay-signer-php/"

#-------------------------------------------------------------------------------

.PHONY: tag
tag:
	@ if [ $$(git status -s -uall | wc -l) != 0 ]; then echo 'ERROR: Git workspace must be clean.'; exit 1; fi;

	@echo "This release will be tagged as: $$(cat ./VERSION)"
	@echo "This version should match your release. If it doesn't, re-run 'make version'."
	@echo "---------------------------------------------------------------------"
	@read -p "Press any key to continue, or press Control+C to cancel. " x;

	@echo " "
	@chag update $$(cat ./VERSION)
	@echo " "
{'fraction_non_alphanumeric': 0.32651039947177285, 'fraction_numerical': 0.0019808517662594917, 'mean_word_length': 1.5334448160535117, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '268706', 'n_tokens_mistral': 956, 'n_tokens_neox': 908, 'n_words': 307}