forked from replicatedhq/help-center
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (63 loc) · 2.21 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
VENDOR_SWAGGER_SOURCE ?= "https://api.replicated.com/vendor"
SHELL := /bin/bash -o pipefail
install:
yarn
build:
`npm bin`/browserify static/js/supportBundleUpload.js > static/js/supportBundleUpload.bundled.js
yarn gulp
hugo -v
build_staging:
`npm bin`/browserify static/js/supportBundleUpload.js > static/js/supportBundleUpload.bundled.js
yarn gulp
hugo -v --config config.staging.yaml
serve:
hugo serve --disableFastRender
serve-all:
hugo serve --disableFastRender --bind 0.0.0.0
serve_staging:
hugo serve --config config.staging.yaml
index-site:
yarn index-site
index-and-send:
yarn index-and-send
index-and-send-staging:
yarn index-and-send-staging
vendordocs:
rm -f content/docs/reference/vendor-api.md
git checkout content/docs/reference/vendor-api/index.md
find . -name "*vendor-api*" -ls
VENDOR_API="${VENDOR_SWAGGER_SOURCE}" ./vendor.sh
setup:
mkdir -p java
curl -o java/swagger2markup-cli-1.3.1.jar http://central.maven.org/maven2/io/github/swagger2markup/swagger2markup-cli/1.3.1/swagger2markup-cli-1.3.1.jar
curl -o java/swagger2markup-1.3.1.jar http://central.maven.org/maven2/io/github/swagger2markup/swagger2markup/1.3.1/swagger2markup-1.3.1.jar
# this skips *all* of community, but its a start
# it only really works against prod right now, but with some more exclusions
# it could probably work for staging as well. Notably, we have no community
# in staging. For now just want to run this in prod and see how it feels,
# not blocking any builds yet.
linkcheck:
npm install [email protected]
`npm bin`/blc https://help.replicated.com -r \
--host-requests 20 \
--requests 20 \
\
--exclude 'server:8800' \
--exclude '10.128.0.4' \
--exclude 'get.company.com/docker' \
\
--exclude 'golang.org' \
--exclude 'circleci.com' \
--exclude 'registry.replicated.com' \
--exclude 'registry-data.replicated.com' \
--exclude 'api.replicated.com' \
--exclude 'get.replicated.com' \
\
--exclude 'help.replicated.com/community' \
--exclude 'help.replicated.com/tos' \
--exlcude 'help.replicated.com/faq' \
--exclude 'help.replicated.com/privacy' \
--exclude 'help.replicated.com/guidelines' \
--exclude 'microsoft.com' \
\
--color=always | grep -E 'Getting|Finished|BROKEN|^$$'