Updates to Makefile
-test:
- pipenv run promgen test
.PHONY: test
+test: pipenv
+ pipenv run promgen test
+
+.PHONY: all
+all: clean pipenv test build
+
-build:
- docker-compose build
.PHONY: build
+build: pipenv
+ docker-compose build
+
+.PHONY: shell
shell:
docker-compose run --rm worker bash
-.PHONY: shell
+
+.PHONY: docs
docs:
pipenv run sphinx-build -avb html docs dist/html
-.PHONY: docs
-clean:
- rm -rf .venv dist
+
+.PHONY: pipenv
+pipenv:
+ @echo Testing if Pipenv is already installed
+ @pipenv --venv 1> /dev/null 2> /dev/null || pipenv install --dev
+
+
.PHONY: clean
+clean:
+ @echo Removing Pipenv
+ @pipenv --rm || true
+ @echo Clearing dist files
+ @rm -rf dist
+
+
+dump: pipenv
+ pipenv run promgen dumpdata promgen.DefaultExporter --indent=2 --output promgen/fixtures/exporters.yaml --format=yaml
-dump: .venv
- .venv/bin/promgen dumpdata promgen.DefaultExporter --indent=2 --output promgen/fixtures/exporters.yaml --format=yaml
+load: pipenv
+ pipenv run promgen loaddata exporters
-load: .venv
- .venv/bin/promgen loaddata exporters
