mirror of https://github.com/grpc/grpc.io.git
Makefile: only build drafts and futures for draft branches (#558)
This commit is contained in:
parent
d9270c373b
commit
fb9fd47086
30
Makefile
30
Makefile
|
|
@ -1,27 +1,33 @@
|
||||||
HUGO_VERSION = 0.79.0
|
HUGO_VERSION = 0.79.0
|
||||||
|
|
||||||
|
DRAFT_ARGS = --buildDrafts --buildFuture
|
||||||
|
BUILD_ARGS = --minify
|
||||||
|
ifeq (draft, $(or $(findstring draft,$(HEAD)),$(findstring draft,$(BRANCH))))
|
||||||
|
BUILD_ARGS += $(DRAFT_ARGS)
|
||||||
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf public resources
|
rm -rf public/* resources
|
||||||
|
|
||||||
serve:
|
serve:
|
||||||
@./check_hugo.sh
|
@./check_hugo.sh
|
||||||
hugo server \
|
hugo server
|
||||||
--buildDrafts \
|
|
||||||
--buildFuture \
|
serve-drafts:
|
||||||
--disableFastRender
|
@./check_hugo.sh
|
||||||
|
hugo server $(DRAFT_ARGS)
|
||||||
|
|
||||||
|
serve-production: clean
|
||||||
|
@./check_hugo.sh
|
||||||
|
hugo server --minify
|
||||||
|
|
||||||
production-build: clean
|
production-build: clean
|
||||||
@./check_hugo.sh
|
@./check_hugo.sh
|
||||||
hugo \
|
hugo --minify
|
||||||
--minify
|
|
||||||
|
|
||||||
preview-build: clean
|
preview-build: clean
|
||||||
@./check_hugo.sh
|
@./check_hugo.sh
|
||||||
hugo \
|
hugo --baseURL $(DEPLOY_PRIME_URL) $(BUILD_ARGS)
|
||||||
--baseURL $(DEPLOY_PRIME_URL) \
|
|
||||||
--buildDrafts \
|
|
||||||
--buildFuture \
|
|
||||||
--minify
|
|
||||||
|
|
||||||
link-checker-setup:
|
link-checker-setup:
|
||||||
curl https://raw.githubusercontent.com/wjdp/htmltest/master/godownloader.sh | bash
|
curl https://raw.githubusercontent.com/wjdp/htmltest/master/godownloader.sh | bash
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue