mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 20:53:11 -04:00
Source nvm from either $HOME or /usr/local/share
This commit is contained in:
9
Makefile
9
Makefile
@@ -19,14 +19,15 @@ NOTIFY_CREDENTIALS ?= ~/.notify-credentials
|
|||||||
|
|
||||||
VIRTUALENV_ROOT := $(shell [ -z $$VIRTUAL_ENV ] && echo $$(pwd)/venv || echo $$VIRTUAL_ENV)
|
VIRTUALENV_ROOT := $(shell [ -z $$VIRTUAL_ENV ] && echo $$(pwd)/venv || echo $$VIRTUAL_ENV)
|
||||||
|
|
||||||
|
NVMSH := $(shell [ -f "$(HOME)/.nvm/nvm.sh" ] && echo "$(HOME)/.nvm/nvm.sh" || echo "/usr/local/share/nvm/nvm.sh")
|
||||||
|
|
||||||
## DEVELOPMENT
|
## DEVELOPMENT
|
||||||
|
|
||||||
.PHONY: bootstrap
|
.PHONY: bootstrap
|
||||||
bootstrap: generate-version-file ## Set up everything to run the app
|
bootstrap: generate-version-file ## Set up everything to run the app
|
||||||
pip3 install -r requirements_for_test.txt
|
pip3 install -r requirements_for_test.txt
|
||||||
source $(HOME)/.nvm/nvm.sh && nvm install && npm ci --no-audit
|
source $(NVMSH) --install && npm ci --no-audit
|
||||||
source $(HOME)/.nvm/nvm.sh && npm run build
|
source $(NVMSH) && npm run build
|
||||||
|
|
||||||
.PHONY: watch-frontend
|
.PHONY: watch-frontend
|
||||||
watch-frontend: ## Build frontend and watch for changes
|
watch-frontend: ## Build frontend and watch for changes
|
||||||
@@ -38,7 +39,7 @@ run-flask: ## Run flask
|
|||||||
|
|
||||||
.PHONY: npm-audit
|
.PHONY: npm-audit
|
||||||
npm-audit: ## Check for vulnerabilities in NPM packages
|
npm-audit: ## Check for vulnerabilities in NPM packages
|
||||||
source $(HOME)/.nvm/nvm.sh && npm run audit
|
source $(NVMSH) && npm run audit
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
help:
|
help:
|
||||||
@@ -60,7 +61,7 @@ generate-version-file: ## Generates the app version file
|
|||||||
test: ## Run tests
|
test: ## Run tests
|
||||||
flake8 .
|
flake8 .
|
||||||
isort --check-only ./app ./tests
|
isort --check-only ./app ./tests
|
||||||
source /usr/local/share/nvm/nvm.sh && npm test
|
source $(NVMSH) && npm test
|
||||||
py.test -n auto --maxfail=10 tests/
|
py.test -n auto --maxfail=10 tests/
|
||||||
|
|
||||||
.PHONY: fix-imports
|
.PHONY: fix-imports
|
||||||
|
|||||||
Reference in New Issue
Block a user