chore: Add Makefile for common project tasks

This commit is contained in:
2020-03-02 22:31:35 +00:00
parent 2c522f29b9
commit 0c46a7b0ed

24
Makefile Normal file
View File

@@ -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=''