forked from jaegertracing/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (62 loc) · 1.77 KB
/
Makefile
File metadata and controls
79 lines (62 loc) · 1.77 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
HUGO_VERSION = 0.38
HTMLPROOFER = bundle exec htmlproofer
NODE_BIN = node_modules/.bin
HUGO_THEME = jaeger-docs
BASE_URL = https://www.jaegertracing.io
THEME_DIR := themes/$(HUGO_THEME)
GULP := $(NODE_BIN)/gulp
CONCURRENTLY := $(NODE_BIN)/concurrently
WRITE_GOOD := $(NODE_BIN)/write-good
NODE_VER := $(shell node -v | cut -c2- | cut -c1)
GOOD_NODE := $(shell if [ $(NODE_VER) -ge 4 ]; then echo true; else echo false; fi)
macos-setup: check-node
scripts/install-hugo.sh $(HUGO_VERSION) macOS
npm install
(cd $(THEME_DIR) && npm install)
.PHONY: check-node
check-node:
@echo Build requires Node 4.x or higher && $(GOOD_NODE)
netlify-setup:
(cd $(THEME_DIR) && npm install)
clean:
rm -rf \
public \
$(THEME_DIR)/data/assetHashes.json \
$(THEME_DIR)/static/css/style-*.css \
$(THEME_DIR)/static/js/app-*.js
build-content:
hugo -v \
--theme $(HUGO_THEME) \
--baseURL $(BASE_URL)
build-content-preview:
hugo -v \
--theme $(HUGO_THEME)
build-assets:
(cd $(THEME_DIR) && $(GULP) build)
build: clean build-assets build-content
build-preview: clean build-assets build-content-preview
netlify-build: netlify-setup build
netlify-build-preview: netlify-setup build-preview
dev: check-node
$(CONCURRENTLY) "make develop-content" "make develop-assets"
develop-content: build-assets
hugo server \
--theme $(HUGO_THEME) \
--buildDrafts \
--buildFuture \
--disableFastRender \
--ignoreCache
develop-assets:
(cd $(THEME_DIR) && $(GULP) dev)
htmlproofer-setup:
gem install bundler \
--no-rdoc \
--no-ri
NOKOGIRI_USE_SYSTEM_LIBRARIES=true bundle install \
--path vendor/bundle
htmlproofer: build
$(HTMLPROOFER) \
--empty-alt-ignore \
public
write-good:
$(WRITE_GOOD) content/**/*.md