From 052b32a0289e27263c25933e7e4a47887caba57f Mon Sep 17 00:00:00 2001
From: Hemna <waboring@hemna.com>
Date: Fri, 3 Sep 2021 17:14:12 -0400
Subject: [PATCH] Updated Makefile

---
 Makefile             | 31 +++++++++++++++++++------------
 requirements-dev.txt | 21 +++++++++++----------
 2 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/Makefile b/Makefile
index 2395355..488cc2e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,7 @@
+REQUIREMENTS_TXT ?= requirements.txt requirements-dev.txt
+.DEFAULT_GOAL := help
+
+.PHONY: help dev test
 include Makefile.venv
 Makefile.venv:
 	curl \
@@ -7,28 +11,31 @@ Makefile.venv:
 		| sha256sum --check - \
 		&& mv Makefile.fetched Makefile.venv
 
-all: pip dev
+help:	# Help for the Makefile
+	@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
 
-.PHONY: dev
-dev: venv
+dev: venv  ## Create the virtualenv with all the requirements installed
 
-clean: clean-venv
+docs: build
+	cp README.rst docs/readme.rst
+	cp Changelog docs/changelog.rst
+	tox -edocs
+
+clean: clean-venv  ## Clean out any build artifacts to start over
 	rm -rf dist/*
 
-.PHONY: test
-test: dev
+test: dev  ## Run all the tox tests
 	tox -p all
 
-build: test
+build: test  ## Make the build artifact prior to doing an upload
 	$(VENV)/python3 setup.py sdist bdist_wheel
 	$(VENV)/twine check dist/*
 
-upload: build
-	$(VENV)/twine upload dist/*a
+upload: build  ## Upload a new version of the plugin
+	$(VENV)/twine upload dist/*
 
-check: dev # Code format check with isort and black
-	tox -efmt-check
+check: dev ## Code format check with tox and pep8
 	tox -epep8
 
-fix: dev # fixes code formatting with isort and black
+fix: dev ## fixes code formatting with gray
 	tox -efmt
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 09cfee0..7555017 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,11 +1,12 @@
-pip==19.2.3
-bump2version==0.5.11
-wheel==0.33.6
-watchdog==0.9.0
-flake8==3.7.8
-tox==3.14.0
-coverage==4.5.4
-Sphinx==1.8.5
-twine==1.14.0
-pytest==6.2.4
+pip
+pip-tools
+bump2version
+wheel
+watchdog
+flake8
+tox
+coverage
+Sphinx
+twine
+pytest==6.2.5
 gray