From 0c46a7b0ed5ddbe01f3ed9dd2563a7a3467bdd33 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 2 Mar 2020 22:31:35 +0000 Subject: [PATCH] chore: Add Makefile for common project tasks --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2e13262 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +test: bootstrap + molecule test --all + +test-%: bootstrap + molecule test -s "$*" + +lint: bootstrap + molecule lint + +bootstrap: + $(eval PIP := $(shell which pip)) + $(if $(PIP),,$(eval PIP := $(shell which pip3))) + $(if $(PIP),,$(error No pip or pip3 found in PATH)) + + $(PIP) install -r requirements.txt + +new-version: + $(if $(shell which npx),,\ + $(error No npx not found in PATH, please install NodeJS)) + $(if $(shell which standardx-version),,\ + $(error No standard-version not found in PATH, install with: \ + npm install -g standard-version)) + + npx standard-version --tag-prefix=''