From fa40e9350ec5f58d32119a89c5c8172734fc46f5 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Thu, 3 Mar 2016 11:00:46 +0200 Subject: [PATCH] - Added lint target, updated documentation. --- Makefile | 7 +++++-- README.rst | 15 +++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 4c31120..4524ce2 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ -.PHONY: test clean +.PHONY: test clean lint + +lint: + /bin/sh -en bundle_certs clean: if [ -f .server.pid ] && [ -d "/proc/$$(cat .server.pid)" ]; then kill "$$(cat .server.pid)"; fi @@ -49,7 +52,7 @@ clean: .testcerts/bundle.crt: .testcerts/intermediates.crt .testcerts/server.crt ./bundle_certs .testcerts/* > .testcerts/bundle.crt -test: .testcerts/bundle.crt .testcerts/root.crt .testcerts/server.key +test: lint .testcerts/bundle.crt .testcerts/root.crt .testcerts/server.key openssl s_server -cert .testcerts/bundle.crt -key .testcerts/server.key -quiet -www -no_dhe & echo "$$!" > .server.pid test "$$(curl --fail --cacert .testcerts/root.crt --write-out '%{ssl_verify_result}' --silent --output /dev/null https://localhost:4433)" = "0" if [ -f .server.pid ] && [ -d "/proc/$$(cat .server.pid)" ]; then kill "$$(cat .server.pid)"; fi diff --git a/README.rst b/README.rst index a30747c..3895229 100644 --- a/README.rst +++ b/README.rst @@ -55,17 +55,12 @@ Shell functions subject hash). - bundle_certs: See Usage section above. +Development +----------- -Testing -------- - -Simply run: - -.. code:: shell - - make test - -I suggest adding the test as a pre-push Git hook since it is quite fast. +To ease development :code:`make clean`, :code:`make lint` and :code:`make test` +are available. It's recommended to add :code:`make lint` and :code:`make test` +to to your Git pre-commit and pre-push hooks accourdingly. License ------- -- GitLab