Initial setup
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BAZEL_VERSION=7.4.1
|
||||
BAZEL_URL=https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64
|
||||
BAZEL_SHA256_CHECKSUM=c97f02133adce63f0c28678ac1f21d65fa8255c80429b588aeeba8a1fac6202b
|
||||
REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||
OUT_PATH="${REPO_ROOT}/bazel-${BAZEL_VERSION}"
|
||||
BAZEL_BIN="${OUT_PATH}/bazel"
|
||||
|
||||
if [ ! -f "${BAZEL_BIN}" ]; then
|
||||
mkdir -p "${OUT_PATH}"
|
||||
fi
|
||||
|
||||
if [ ! -f "${BAZEL_BIN}" ]; then
|
||||
curl -L -o "${BAZEL_BIN}" "${BAZEL_URL}"
|
||||
chmod +x "${BAZEL_BIN}"
|
||||
fi
|
||||
|
||||
sha256sum ${BAZEL_BIN} | grep -q ${BAZEL_SHA256_CHECKSUM}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "bazel binary checksum mismatch, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"${BAZEL_BIN}" "${@}"
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# github.com/bazelbuild/rules_go/issues/3110
|
||||
# export GOPACKAGESDRIVER_BAZEL_BUILD_FLAGS=--strategy=GoStdlibList=local
|
||||
# github.com/bazelbuild/rules_go/wiki/Editor-setup
|
||||
/home/coder/.local/bin/bazel run -- @rules_go//go/tools/gopackagesdriver "${@}"
|
||||
Reference in New Issue
Block a user