move the ENV variable to the nix-shell

This commit is contained in:
Andreas Zweili 2022-03-01 10:04:34 +01:00
parent 724b5fb759
commit 44adc5b94d
2 changed files with 1 additions and 5 deletions

1
.envrc
View File

@ -1 +1,2 @@
use flake use flake
eval "$shellHook"

View File

@ -5,7 +5,6 @@ SHELL=/usr/bin/env bash
.PHONY: run .PHONY: run
run: setup run: setup
( \ ( \
export DJANGO_SETTINGS_MODULE=network_inventory.settings.local; \
find . -name __pycache__ -o -name "*.pyc" -delete; \ find . -name __pycache__ -o -name "*.pyc" -delete; \
python manage.py runserver; \ python manage.py runserver; \
) )
@ -13,7 +12,6 @@ run: setup
.PHONY: setup .PHONY: setup
setup: setup:
( \ ( \
export DJANGO_SETTINGS_MODULE=network_inventory.settings.local; \
docker-compose -f docker-compose-development.yml up -d; \ docker-compose -f docker-compose-development.yml up -d; \
if [ -f .second_run ]; then \ if [ -f .second_run ]; then \
sleep 2; \ sleep 2; \
@ -64,20 +62,17 @@ cleanall: clean
.PHONY: init .PHONY: init
init: init:
( \ ( \
export DJANGO_SETTINGS_MODULE=network_inventory.settings.local; \
python manage.py loaddata network_inventory.yaml; \ python manage.py loaddata network_inventory.yaml; \
) )
.PHONY: test .PHONY: test
test: test:
( \ ( \
export DJANGO_SETTINGS_MODULE=network_inventory.settings.local; \
pytest -nauto --nomigrations --cov=. --cov-report=html; \ pytest -nauto --nomigrations --cov=. --cov-report=html; \
) )
.PHONY: debug .PHONY: debug
debug: debug:
( \ ( \
export DJANGO_SETTINGS_MODULE=network_inventory.settings.local; \
pytest --pdb --nomigrations --cov=. --cov-report=html; \ pytest --pdb --nomigrations --cov=. --cov-report=html; \
) )