Skip to content

Commit 3c17f7c

Browse files
committed
chore: add Makefile
1 parent da58ee9 commit 3c17f7c

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

Makefile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ hyperfine:
9090
$(BINARY): FORCE
9191
go build -o $@ ./cmd/golangci-lint
9292

93-
docs/static/demo.gif: FORCE
94-
vhs docs/golangci-lint.tape
95-
9693
assets/github-action-config.json: FORCE $(BINARY)
9794
# go run ./scripts/gen_github_action_config/main.go $@
9895
cd ./scripts/gen_github_action_config/; go run . ../../$@
@@ -102,6 +99,23 @@ go.mod: FORCE
10299
go mod verify
103100
go.sum: go.mod
104101

102+
# Documentation
103+
104+
docs_serve:
105+
@make -C ./docs serve
106+
.PHONY: docs_serve
107+
108+
docs_reset:
109+
@make -C ./docs reset
110+
.PHONY: docs_reset
111+
112+
docs_clean:
113+
@make -C ./docs clean
114+
.PHONY: docs_clean
115+
116+
docs/static/demo.gif: FORCE
117+
vhs docs/golangci-lint.tape
118+
105119
website_copy_jsonschema:
106120
go run ./scripts/website/copy_jsonschema/
107121
.PHONY: website_copy_jsonschema

docs/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.PHONY: default clean reset serve
2+
3+
default: clean serve
4+
5+
clean:
6+
rm -rf public/
7+
8+
reset:
9+
git checkout HEAD content/
10+
11+
serve: clean
12+
hugo server --disableFastRender --buildDrafts --enableGitInfo --watch --source .

docs/content/docs/contributing/website.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ Install Hugo (v0.148.1 or newer).
3535
Run:
3636

3737
```bash
38-
hugo server --buildDrafts --disableFastRender
38+
# (if in the root of the repository)
39+
make docs_serve
40+
# OR (if inside the docs/ folder)
41+
make serve
3942
```
4043

4144
And navigate to `http://localhost:1313` after a successful build.
@@ -48,5 +51,6 @@ Also, there is no need to refresh a webpage: hot reload updates changed content
4851
To do this, run:
4952

5053
```bash
54+
# (only in the root of the repository)
5155
make website_expand_templates
5256
```

0 commit comments

Comments
 (0)