Skip to content

Commit

Permalink
Merge pull request #21 from NHSDigital/rossbugginsnhs/makefile-docs-b…
Browse files Browse the repository at this point in the history
…ase-url-for-empty

Update Docs Makefile support empty variable
  • Loading branch information
RossBugginsNHS authored Jun 28, 2024
2 parents 8098d26 + e931821 commit 567c449
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ install:
s serve:
bundle exec jekyll serve --trace --livereload

define baseurlparam =
$(if $(BASE_URL),-- --baseurl $(BASE_URL),-- --baseurl "/")
endef

build: version
npm run build -- --baseurl $(BASE_URL)
npm run build $(baseurlparam)

debug: version
npm run debug -- --baseurl $(BASE_URL)
npm run debug $(baseurlparam)

version:
touch _config.version.yml
Expand All @@ -30,4 +34,3 @@ version:
else \
echo "version: $(VERSION)" > _config.version.yml; \
fi

0 comments on commit 567c449

Please sign in to comment.