forked from istio/istio.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (35 loc) · 1.22 KB
/
Makefile
File metadata and controls
50 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
ISTIO_SERVE_DOMAIN ?= localhost
export ISTIO_SERVE_DOMAIN
img := gcr.io/istio-testing/website-builder:2019-05-03
docker := docker run -e INTERNAL_ONLY=true -t -i --sig-proxy=true --rm -v $(shell pwd):/site -w /site $(img)
ifeq ($(INTERNAL_ONLY),)
docker := docker run -t -i --sig-proxy=true --rm -v $(shell pwd):/site -w /site $(img)
endif
ifeq ($(CONTEXT),production)
baseurl := "$(URL)"
endif
build:
@$(docker) scripts/build_site.sh
gen: build
@$(docker) scripts/gen_site.sh ""
opt:
@$(docker) scripts/opt_site.sh
clean_public:
@rm -fr public
clean: clean_public
@rm -fr resources .htmlproofer tmp
lint: clean_public build gen
@$(docker) scripts/lint_site.sh
serve: build
@docker run -t -i --sig-proxy=true --rm -v $(shell pwd):/site -w /site -p 1313:1313 $(img) hugo serve --baseURL "http://${ISTIO_SERVE_DOMAIN}:1313/" --bind 0.0.0.0 --disableFastRender
install:
@npm install -g sass sass-lint typescript tslint @babel/cli @babel/core svgstore-cli
@npm install babel-preset-minify --save-dev
netlify: install
@scripts/build_site.sh
@scripts/gen_site.sh "$(baseurl)"
netlify_archive:
@scripts/gen_archive_site.sh "$(baseurl)"
archive:
@$(docker) scripts/gen_archive_site.sh "$(baseurl)"
include Makefile.common.mk