-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #875 from DirectXMan12/docs/autogen-marker-docs
📖 Marker Docs
- Loading branch information
Showing
28 changed files
with
1,304 additions
and
152 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,54 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
os=$(go env GOOS) | ||
arch=$(go env GOARCH) | ||
|
||
# translate arch to rust's conventions (if we can) | ||
if [[ ${arch} == "amd64" ]]; then | ||
arch="x86_64" | ||
elif [[ ${arch} == "x86" ]]; then | ||
arch="i686" | ||
fi | ||
|
||
# translate os to rust's conventions (if we can) | ||
ext="tar.gz" | ||
cmd="tar -C /tmp -xzvf" | ||
case ${os} in | ||
windows) | ||
target="pc-windows-msvc" | ||
ext="zip" | ||
cmd="unzip -d /tmp" | ||
;; | ||
darwin) | ||
target="apple-darwin" | ||
;; | ||
linux) | ||
# works for linux, too | ||
target="unknown-${os}-gnu" | ||
;; | ||
*) | ||
target="unknown-${os}" | ||
;; | ||
esac | ||
|
||
# grab mdbook | ||
# mdbook's deploy got borked by a CI move, so grab our build till that gets | ||
# fixed (https://github.com/rust-lang-nursery/mdBook/issues/904). | ||
curl -sL -o /tmp/mdbook https://storage.googleapis.com/kubebuilder-build-tools/mdbook-0.2.3-${os}-${arch} | ||
# we hardcode linux/amd64 since rust uses a different naming scheme and it's a pain to tran | ||
echo "downloading mdBook-v0.3.1-${arch}-${target}.${ext}" | ||
set -x | ||
curl -sL -o /tmp/mdbook.${ext} https://github.com/rust-lang-nursery/mdBook/releases/download/v0.3.1/mdBook-v0.3.1-${arch}-${target}.${ext} | ||
${cmd} /tmp/mdbook.${ext} | ||
chmod +x /tmp/mdbook | ||
|
||
echo "grabbing the latest released controller-gen" | ||
# TODO(directxman12): remove the @v0.2.0-beta.4 once get v0.2.0 released, | ||
# so that we actually get the latest version | ||
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.0-beta.4 | ||
|
||
# make sure we add the go bin directory to our path | ||
gobin=$(go env GOBIN) | ||
gobin=${GOBIN:-$(go env GOPATH)/bin} # GOBIN won't always be set :-/ | ||
|
||
export PATH=${gobin}:$PATH | ||
/tmp/mdbook build |
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,11 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
( | ||
pushd ./utils | ||
go build -o ../../../bin/marker-docs ./markerdocs | ||
popd | ||
) &>/dev/null | ||
|
||
../../bin/marker-docs "$@" |
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 |
---|---|---|
|
@@ -3,5 +3,4 @@ | |
Things left to do: | ||
|
||
- Write custom printer columns | ||
- Discuss webhooks | ||
- Use different watches |
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
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
Oops, something went wrong.