Skip to content

Commit

Permalink
build: make docs
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Di Donato <[email protected]>
  • Loading branch information
leodido authored and leogr committed Apr 9, 2020
1 parent 35bde7e commit 5957b6a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
event-generator
evtgen-docgen
dist/
events/k8saudit/yaml/bundle.go
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ TEST_FLAGS ?= -v -race

main ?= .
output ?= event-generator
docgen ?= evtgen-docgen

.PHONY: build
build: clean events/k8saudit/yaml/bundle.go ${output}
Expand All @@ -18,11 +19,22 @@ ${output}:
clean:
$(RM) -R ${output}
$(RM) -f events/k8saudit/yaml/bundle.go
$(RM) -R ${output} ${docgen}

.PHONY: test
test:
$(GO) vet ./...
$(GO) test ${TEST_FLAGS} ./...

events/k8saudit/yaml/bundle.go: events/k8saudit/yaml events/k8saudit/yaml/*.yaml
$(GO) run ./tools/file-bundler/ $<
$(GO) run ./tools/file-bundler/ $<

.PHONY: ${docgen}
${docgen}: ${PWD}/tools/docgen/docgen.go
$(GO) build -v -o $@ $^

.PHONY: docs
docs: ${docgen}
$(RM) -R docs/*
@mkdir -p docs
${PWD}/${docgen}

0 comments on commit 5957b6a

Please sign in to comment.