Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix doc preview #3535

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ src = "src"
title = "The Kubebuilder Book"

[output.html]
google-analytics = "UA-119864590-1"
curly-quotes = true
additional-css = ["theme/css/markers.css", "theme/css/custom.css", "theme/css/version-dropdown.css"]
git-repository-url = "https://github.com/kubernetes-sigs/kubebuilder"
Expand All @@ -16,3 +15,10 @@ command = "./litgo.sh"

[preprocessor.markerdocs]
command = "./markerdocs.sh"

[context.environment]
environment = { GO_VERSION = "1.20" }

[context.deploy-preview.environment]
environment = { GO_VERSION = "1.20" }

12 changes: 8 additions & 4 deletions docs/book/install-and-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ THIS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)

cd "$THIS_DIR"

[[ -n "$(command -v gimme)" ]] && eval "$(gimme stable)"
if [[ -n "$(command -v gimme)" ]]; then
GO_VERSION=${GO_VERSION:-stable} # Use the provided GO_VERSION or default to 'stable'
eval "$(gimme $GO_VERSION)"
fi
echo go version
GOBIN=$THIS_DIR/functions go install ./...

Expand Down Expand Up @@ -60,14 +63,15 @@ esac

# grab mdbook
# we hardcode linux/amd64 since rust uses a different naming scheme and it's a pain to tran
echo "downloading mdBook-v0.4.21-${arch}-${target}.${ext}"
echo "downloading mdBook-v0.4.34-${arch}-${target}.${ext}"
set -x
curl -sL -o /tmp/mdbook.${ext} https://github.com/rust-lang-nursery/mdBook/releases/download/v0.4.2/mdBook-v0.4.2-${arch}-${target}.${ext}
curl -sL -o /tmp/mdbook.${ext} https://github.com/rust-lang/mdBook/releases/download/v0.4.34/mdBook-v0.4.34-${arch}-${target}.${ext}
${cmd} /tmp/mdbook.${ext}
chmod +x /tmp/mdbook

echo "grabbing the latest released controller-gen"
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.12.0
go version
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.12.1

# make sure we add the go bin directory to our path
gobin=$(go env GOBIN)
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
base = "docs/book"
command = "./install-and-build.sh"
command = "GO_VERSION=1.20 ./install-and-build.sh"
publish = "docs/book/book"
functions = "docs/book/functions"

Expand Down
Loading