Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Makefile #387

Merged
merged 3 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
> Please note that you need to install the "extended" version of Hugo (with
> built-in support) to run the site locally.

A few notes to be aware of:

* Before submitting a PR be sure to run `make test` and address any issues uncovered
* Any make target that requires `get-milestones` requires that a GH_TOKEN environment variable be set

## Deploy previews

Whenever you submit a pull request to this repo, Netlify creates a [deploy
Expand Down
36 changes: 16 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
build:
hugo --minify

ci-build-preview:
hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--minify

ci-link-check:
curl https://raw.githubusercontent.com/wjdp/htmltest/master/godownloader.sh | bash
bin/htmltest

clean:
rm -rf public

Expand All @@ -9,27 +21,11 @@ setup:
serve: setup
hugo server -p 30000 --buildDrafts --buildFuture && npm start

preview-build: get-milestones
hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--minify
make ci-link-check
test: build ci-link-check

production-build: get-milestones
hugo \
--minify
make ci-link-check
preview-build: get-milestones ci-build-preview ci-link-check

production-build: get-milestones build ci-link-check

get-milestones: setup
node -r esm ./scripts/fetchMilestones.js

build:
hugo --minify

link-checker-setup:
curl https://raw.githubusercontent.com/wjdp/htmltest/master/godownloader.sh | bash

run-link-checker:
bin/htmltest

ci-link-check: link-checker-setup run-link-checker