Skip to content

Commit 9678329

Browse files
authored
Merge pull request #34 from NHSDigital/feature/update-make-commands-and-readme
bugfixes for make commands
2 parents 63aef17 + 53d92e7 commit 9678329

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ else
133133
npx redocly bundle specification/eligibility-signposting-api.yaml --remove-unused-components --keep-url-references --ext yaml > build/specification/$(APIM_ENV)/eligibility-signposting-api.yaml
134134
endif
135135

136+
construct-spec-mac: guard-APIM_ENV
137+
@ $(MAKE) update-spec-template APIM_ENV=$$APIM_ENV
138+
mkdir -p build/specification/$(APIM_ENV)
139+
ifeq ($(APIM_ENV), sandbox)
140+
gsed '/^[[:space:]]*security:/,/^[[:space:]]*-[[:space:]]/c\ security:\n - app-level0: []' specification/eligibility-signposting-api.yaml > specification/eligibility-signposting-api.generated.yaml && \
141+
npx redocly bundle specification/eligibility-signposting-api.generated.yaml --remove-unused-components --keep-url-references --ext yaml > build/specification/$(APIM_ENV)/eligibility-signposting-api.yaml
142+
rm specification/eligibility-signposting-api.generated.yaml
143+
else
144+
npx redocly bundle specification/eligibility-signposting-api.yaml --remove-unused-components --keep-url-references --ext yaml > build/specification/$(APIM_ENV)/eligibility-signposting-api.yaml
145+
endif
146+
136147

137148
SPEC_DIR := $(CURDIR)/specification
138149
POSTMAN_DIR := $(SPEC_DIR)/postman

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ The following software packages, or their equivalents, are expected to be instal
4949
- [Docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [Podman](https://podman.io/),
5050
- [asdf](https://asdf-vm.com/) version manager,
5151
- [GNU make](https://www.gnu.org/software/make/) 3.82 or later,
52+
- [npm](https://www.npmjs.com/)
5253

5354
> [!NOTE]<br>
5455
> The version of GNU make available by default on macOS is earlier than 3.82. You will need to upgrade it or certain `make` tasks will fail. On macOS, you will need [Homebrew](https://brew.sh/) installed, then to install `make`, like so:

sandbox/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ proxygen-docker-login: # Login to Proxygen Docker registry
2626
proxygen docker get-login | bash
2727

2828
publish-to-docker-repo:
29-
proxygen-docker-login
29+
make proxygen-docker-login
3030
docker push 958002497996.dkr.ecr.eu-west-2.amazonaws.com/eligibility-signposting-api:latest
3131

3232
build-and-publish-sandbox-image:
@@ -35,7 +35,7 @@ build-and-publish-sandbox-image:
3535

3636
deploy-sandbox-spec:
3737
make -C .. construct-spec APIM_ENV=sandbox
38-
proxygen instance deploy sandbox eligibility-signposting-api ./build/specification/sandbox/eligibility-signposting-api.yaml
38+
proxygen instance deploy sandbox eligibility-signposting-api build/specification/sandbox/eligibility-signposting-api.yaml
3939

4040
up: build
4141
docker compose -f docker-compose.yaml up -d

scripts/config/vale/styles/config/vocabularies/words/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Dependabot
88
Gitleaks
99
Grype
1010
idempotence
11+
npm
1112
OAuth
1213
Octokit
1314
onboarding

specification/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ See the [Proxygen CLI user guide](https://nhsd-confluence.digital.nhs.uk/spaces/
3737

3838
We deploy our specifications using the Proxygen CLI. In order to do this, the following steps need to be performed:
3939

40-
1. Construct the specification for the environment of your choice, following the instructions above. This will be stored in
40+
1. Construct the specification for the environment of your choice, following the instructions above.
4141
2. Activate a poetry environment `poetry env activate` - you may need to run `make install-python` to install poetry etc. first.
4242
3. Run `make retrieve-proxygen-key` from the root directory to retrieve the private key needed to authenticate with Proxygen.
4343
4. Run `make setup-proxygen-credentials` from the root directory to set up credentials needed to interact with our API proxy.

0 commit comments

Comments
 (0)