-
Notifications
You must be signed in to change notification settings - Fork 164
/
Makefile
78 lines (62 loc) · 1.98 KB
/
Makefile
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
HTMLPROOFER = bundle exec htmlproofer
HUGO_THEME = jaeger-docs
THEME_DIR := themes/$(HUGO_THEME)
client-libs-docs:
@for d in $(shell ls -d content/docs/* | grep -v next-release-v2 | grep -vE '2\.[0-9]+\.[0-9]+'); do \
cp content/_client_libs/client-libraries.md $$d/; \
cp content/_client_libs/client-features.md $$d/; \
echo "copied content/_client_libs/*.md -> $$d/"; \
done
generate: client-libs-docs
develop: generate
HUGO_PREVIEW=true hugo server \
--buildDrafts \
--buildFuture \
--ignoreCache
clean:
rm -rf public
netlify-production-build: generate
hugo --minify
rm -rf public/_client_libs
netlify-deploy-preview: generate
HUGO_PREVIEW=true hugo \
--buildDrafts \
--buildFuture \
--baseURL $(DEPLOY_PRIME_URL) \
--minify
rm -rf public/_client_libs
netlify-branch-deploy: generate
hugo \
--buildDrafts \
--buildFuture \
--baseURL $(DEPLOY_PRIME_URL) \
--minify
rm -rf public/_client_libs
build: clean generate
hugo --logLevel info
rm -rf public/_client_libs
link-checker-setup:
curl https://raw.githubusercontent.com/wjdp/htmltest/master/godownloader.sh | bash
run-link-checker:
bin/htmltest
check-internal-links: clean build link-checker-setup run-link-checker
check-all-links: clean build link-checker-setup
bin/htmltest --conf .htmltest.external.yml
spellcheck:
cat scripts/cspell/project-names.txt | grep -v '^#' | grep -v '^\s*$$' | tr ' ' '\n' > scripts/cspell/project-names-parsed.txt
cd scripts/cspell && ./spellcheck.sh
# only x.y.0 semver values are valid for kicking off a new release.
SEMVER_REGEX := ^([0-9]+\.){2}0$$
VALID_VERSION := $(shell echo "$(VERSION)" | grep -E "$(SEMVER_REGEX)")
ifneq "$(VALID_VERSION)" "$(VERSION)"
validate-version:
@echo "ERROR: Invalid VERSION=$(VERSION). Must be in format x.y.0."
@false # Exit with an error code
else
validate-version:
@echo "VERSION=$(VERSION) is valid."
endif
# `make start-release VERSION=x.y.0
start-release: validate-version
git tag release-$(VERSION)
git push upstream release-$(VERSION)