Skip to content

Commit

Permalink
Use bazelisk from npm for netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Dec 22, 2023
1 parent b80908e commit 3d2228c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 30 deletions.
19 changes: 1 addition & 18 deletions .netlify/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,7 @@

set -eux

export PATH="$HOME/bin:$PATH"

# XXX We don't want to be using the Nixpkgs CC toolchain, because
# Nixpkgs is not available. But currently we can only override the
# autoconfigured CC toolchain, not have several (which we would then
# select via --extra_toolchains). So here's a gross hack that simply
# patches out the nixpkgs_cc_configure() line.
#
# See https://github.com/bazelbuild/bazel/issues/6696.
awk '
BEGIN {del=0}
/^nixpkgs_cc_configure\(/ {del=1}
del==0 {print}
/\)/ {del=0}' WORKSPACE > WORKSPACE.tmp
# Note: awk -i inplace not available
mv WORKSPACE.tmp WORKSPACE

bazel build //docs:api_html
npx @bazel/bazelisk build //docs:api_html
mkdir -p public
unzip -d public bazel-bin/docs/api_html-stardoc.zip
cp start public
4 changes: 0 additions & 4 deletions .netlify/install.sh

This file was deleted.

1 change: 0 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ exports_files(["start"])
exports_files(
[
".netlify/build.sh",
".netlify/install.sh",
"serve-docs.sh",
],
visibility = ["//tests/shellcheck:__pkg__"],
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build]
command = ".netlify/install.sh && .netlify/build.sh"
command = ".netlify/build.sh"
publish = "public"
6 changes: 0 additions & 6 deletions tests/shellcheck/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ shellcheck(
data = ["@rules_haskell//:.netlify/build.sh"],
)

shellcheck(
name = "netlify-install",
args = ["$(location @rules_haskell//:.netlify/install.sh)"],
data = ["@rules_haskell//:.netlify/install.sh"],
)

shellcheck(
name = "serve-docs",
args = ["$(location @rules_haskell//:serve-docs.sh)"],
Expand Down

0 comments on commit 3d2228c

Please sign in to comment.