forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build docs script (elastic#1873)
To build the docs, `make docs` can be used. To preview the docs, `make docs-preview` can be used. * Building the docs is now part of make testsuite * Make local docs build and preview easy by adding it to the makefile * Update CONTRIBUTING.md with new commands The generators are currently not part of the build as they require glide to be installed.
- Loading branch information
1 parent
fb21b76
commit bcc9866
Showing
6 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
# Runs test build for the count metricset | ||
.PHONY: test | ||
test: | ||
$(MAKE) -C beat test | ||
$(MAKE) -C metricbeat/metricset test | ||
|
||
# Cleans up environment | ||
.PHONY: clean | ||
clean: | ||
$(MAKE) -C beat clean | ||
$(MAKE) -C metricbeat/metricset clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Checks if docs clone already exists | ||
if [ ! -d "build/docs" ]; then | ||
# Only head is cloned | ||
git clone --depth=1 https://github.com/elastic/docs.git build/docs | ||
else | ||
echo "build/docs already exists. Not cloning." | ||
fi | ||
|
||
# beatnames must be passed as parameters. Example: packetbeat filebeat | ||
for name in $* | ||
do | ||
index="$GOPATH/src/github.com/elastic/beats/${name}/docs/index.asciidoc" | ||
echo $index | ||
if [ -f "$index" ]; then | ||
echo "Building docs for ${name}..." | ||
dest_dir="build/html_docs/${name}" | ||
mkdir -p "$dest_dir" | ||
./build/docs/build_docs.pl --doc "$index" -out "$dest_dir" | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters