diff options
author | Ian Lewis <ianlewis@google.com> | 2020-01-21 15:19:51 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-21 15:19:51 +0900 |
commit | 3e5c5e9e088fb6f8556c5c7a3a58db4f28c83fd2 (patch) | |
tree | 2748a6ae2ad906030317096849dbb93f92d6be4b /Makefile | |
parent | 5c23b68aac81acb98fe6686c797470d09fffb78f (diff) | |
parent | a910cc8fd10e508de56e97c2de2af289c1f1f7bb (diff) |
Merge branch 'master' into readme
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -8,6 +8,7 @@ GEN_SOURCE = $(wildcard cmd/generate-syscall-docs/*) APP_SOURCE = $(wildcard cmd/gvisor-website/*) # Target Go files, example: public/main.go, public/foo/bar.go. APP_TARGET = $(patsubst cmd/gvisor-website/%,public/%,$(APP_SOURCE)) +CONTENT_SOURCE = $(wildcard content/*) default: website .PHONY: default @@ -55,7 +56,7 @@ static-production: hugo-docker-image compatibility-docs node_modules config.toml hugo .PHONY: static-production -static-staging: hugo-docker-image compatibility-docs node_modules config.toml $(shell find archetypes assets content themes -type f | sed 's/ /\\ /g') +static-staging: hugo-docker-image compatibility-docs node_modules config.toml $(shell find archetypes assets content themes -type f | sed 's/ /\\ /g') docker run \ --rm \ -e HUGO_ENV="production" \ @@ -104,10 +105,28 @@ compatibility-docs: bin/generate-syscall-docs upstream/gvisor/bazel-bin/runsc/li ./upstream/gvisor/bazel-bin/runsc/linux_amd64_pure_stripped/runsc help syscalls -o json | ./bin/generate-syscall-docs -out ./content/docs/user_guide/compatibility/ .PHONY: compatibility-docs -check: htmlproofer-docker-image website - docker run -v $(shell pwd)/public:/public gcr.io/gvisor-website/html-proofer:$(HTMLPROOFER_VERSION) htmlproofer --disable-external --check-html public/static +check: check-markdown check-html .PHONY: check +check-markdown: node_modules $(CONTENT_SOURCE) compatibility-docs + docker run \ + --rm \ + -e USER="$(shell id -u)" \ + -e HOME="/tmp" \ + -u="$(shell id -u):$(shell id -g)" \ + -v $(PWD):/workspace \ + -v /tmp:/tmp \ + -w /workspace \ + --entrypoint 'npm' \ + node run lint-md +.PHONY: check-markdown + +check-html: website + docker run \ + -v $(shell pwd)/public:/public gcr.io/gvisor-website/html-proofer:$(HTMLPROOFER_VERSION) \ + htmlproofer --disable-external --check-html public/static +.PHONY: check-html + # Run a local content development server. Redirects will not be supported. devserver: hugo-docker-image all-upstream compatibility-docs docker run \ |