Skip to content

Commit 00634e1

Browse files
committed
Docs: Install-and-build.sh script fixes and enhancements
Revert mdbook to v0.4.40 Add comment
1 parent 869ca6b commit 00634e1

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

docs/book/install-and-build.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ if [[ ${arch} == "amd64" ]]; then
3838
arch="x86_64"
3939
elif [[ ${arch} == "x86" ]]; then
4040
arch="i686"
41+
elif [[ ${arch} == "arm64" ]]; then
42+
# arm64 is not supported for v0.4.40 mdbook, so using x86_64 type.
43+
# Once the mdbook is upgraded to latest, use 'aarch64'
44+
arch="x86_64"
4145
fi
4246

4347
# translate os to rust's conventions (if we can)
@@ -63,15 +67,21 @@ esac
6367

6468
# grab mdbook
6569
# we hardcode linux/amd64 since rust uses a different naming scheme and it's a pain to tran
66-
echo "downloading mdBook-v0.4.40-${arch}-${target}.${ext}"
70+
MDBOOK_VERSION="v0.4.40"
71+
MDBOOK_BASENAME="mdBook-${MDBOOK_VERSION}-${arch}-${target}"
72+
MDBOOK_URL="https://github.com/rust-lang/mdBook/releases/download/${MDBOOK_VERSION}/${MDBOOK_BASENAME}.${ext}"
73+
74+
echo "downloading ${MDBOOK_BASENAME}.${ext} from ${MDBOOK_URL}"
6775
set -x
68-
curl -sL -o /tmp/mdbook.${ext} https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdBook-v0.4.40-${arch}-${target}.${ext}
76+
curl -fL -o /tmp/mdbook.${ext} "${MDBOOK_URL}"
6977
${cmd} /tmp/mdbook.${ext}
7078
chmod +x /tmp/mdbook
7179

72-
echo "grabbing the latest released controller-gen"
80+
CONTROLLER_GEN_VERSION="v0.18.0"
81+
82+
echo "grabbing the controller-gen version: ${CONTROLLER_GEN_VERSION}"
7383
go version
74-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.18.0
84+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_GEN_VERSION}
7585

7686
# make sure we add the go bin directory to our path
7787
gobin=$(go env GOBIN)

0 commit comments

Comments
 (0)