forked from falcosecurity/falco-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (46 loc) · 1.35 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
ifndef DEPLOY_PRIME_URL
override DEPLOY_PRIME_URL = localhost
endif
ifndef HUGO_ENV
override HUGO_ENV = development
endif
clean:
rm -rf public
dependencies:
npm install && git submodule update -f --init --recursive
serve: dependencies
hugo server --minify \
--buildDrafts \
--buildFuture
production-build: dependencies
make check-github-rate-limit
hugo --minify --environment $(HUGO_ENV)
make check-links
branch-build: dependencies
make check-github-rate-limit
hugo \
--minify \
--environment $(HUGO_ENV) \
--baseURL $(DEPLOY_PRIME_URL)
make check-links
preview-build: dependencies
make check-github-rate-limit
hugo \
--buildDrafts \
--buildFuture \
--minify \
--environment $(HUGO_ENV) \
--baseURL $(DEPLOY_PRIME_URL)
make check-links
link-checker-setup:
curl https://raw.githubusercontent.com/wjdp/htmltest/master/godownloader.sh | bash
run-link-checker:
# bin/htmltest
echo "todo: re-enable link checker"
check-links: link-checker-setup run-link-checker
check-links-locally: check-links
check-github-rate-limit: retrieve-github-rate-limit
$(info [ To translate the reset time (epoch) use 'date -d @<reset value>' ])
retrieve-github-rate-limit:
$(info [ If build fails at a later stage, verify GitHub rate limit suffices ])
curl -s https://api.github.com/rate_limit | jq '{ "GitHub rate quota": .resources.core }' || echo "Error: $?"