Skip to content

Commit 9485aa0

Browse files
authored
Merge pull request #38 from NHSDigital/mb-makefile-updates
Update Makefile to fix dev setup
2 parents be3641a + 864b2b6 commit 9485aa0

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@ include scripts/shared.mk
44

55
clean:: _clean-docker # Clean-up project resources (main) @Operations
66

7-
config: manage_breast_screening/config/.env _install-dependencies githooks-config _install-poetry db migrate seed # Configure development environment (main) @Configuration
7+
# Configure development environment (main) @Configuration
8+
config: manage_breast_screening/config/.env \
9+
_install-tools \
10+
_install-poetry \
11+
githooks-config \
12+
dependencies \
13+
assets \
14+
db migrate seed
815

916
dependencies: # Install dependencies needed to build and test the project @Pipeline
1017
poetry install
1118
npm install
19+
20+
assets: # Compile assets @Pipeline
1221
npm run compile
1322

1423
build: # Build the project artefact @Pipeline
@@ -54,7 +63,7 @@ rebuild-db: _clean-docker db migrate seed # Create a fresh development database
5463
migrate: # Run migrations
5564
poetry run ./manage.py migrate
5665

57-
seed: # load seed data
66+
seed: # Load seed data
5867
poetry run ./manage.py loaddata clinics participants
5968

6069
_install-poetry:

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/shared.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Shared functionality based on https://github.com/NHSDigital/repository-template/blob/main/scripts/init.mk
22

3-
_install-dependency: # Install asdf dependency - mandatory: name=[listed in the '.tool-versions' file]; optional: version=[if not listed]
3+
_install-tool: # Install asdf dependency - mandatory: name=[listed in the '.tool-versions' file]; optional: version=[if not listed]
44
echo ${name}
55
asdf plugin add ${name} ||:
66
asdf install ${name} $(or ${version},)
77

8-
_install-dependencies: # Install all the dependencies listed in .tool-versions
8+
_install-tools: # Install all the tools listed in .tool-versions
99
for plugin in $$(grep ^[a-z] .tool-versions | sed 's/[[:space:]].*//'); do \
10-
make _install-dependency name="$${plugin}" ; \
10+
make _install-tool name="$${plugin}" ; \
1111
done
1212

1313
# This script parses all the make target descriptions and renders the help output.
@@ -59,7 +59,7 @@ HELP_SCRIPT = \
5959
} \
6060
}
6161

62-
.PHONY: _install-dependency _install-dependencies
62+
.PHONY: _install-tool _install-tools
6363
.ONESHELL:
6464
MAKEFLAGS := --no-print-directory
6565
SHELL := /bin/bash

0 commit comments

Comments
 (0)