Skip to content

Commit

Permalink
Fix local development distro
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Feb 6, 2019
1 parent b1064ce commit e2203a9
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 7 deletions.
8 changes: 8 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ npm_package(
],
)

npm_package(
name = "local_testing_package",
testonly = 1,
# The WORKSPACE file isn't in the distribution, but is required for local_repository
srcs = ["WORKSPACE"],
packages = [":rules_nodejs_package"],
)

# This artifact is published to GitHub along with each release
pkg_tar(
name = "release",
Expand Down
2 changes: 1 addition & 1 deletion examples/bazel_managed_deps/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ workspace(name = "bazel_managed_deps_example")
# repository with the rules_nodejs code and we want to test them together.
local_repository(
name = "build_bazel_rules_nodejs",
path = "../../bazel-bin/rules_nodejs_package",
path = "../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
Expand Down
2 changes: 1 addition & 1 deletion examples/define_var/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# repository with the rules_nodejs code and we want to test them together.
local_repository(
name = "build_bazel_rules_nodejs",
path = "../../bazel-bin/rules_nodejs_package",
path = "../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
Expand Down
2 changes: 1 addition & 1 deletion examples/parcel/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ workspace(name = "parcel_example")
# repository with the rules_nodejs code and we want to test them together.
local_repository(
name = "build_bazel_rules_nodejs",
path = "../../bazel-bin/rules_nodejs_package",
path = "../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
Expand Down
2 changes: 1 addition & 1 deletion examples/program/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ workspace(name = "program_example")
# repository with the rules_nodejs code and we want to test them together.
local_repository(
name = "build_bazel_rules_nodejs",
path = "../../bazel-bin/rules_nodejs_package",
path = "../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories")
Expand Down
2 changes: 1 addition & 1 deletion examples/test_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -u -e -o pipefail
cd $(dirname $0)

# Make sure the distro is up-to-date and can be referenced at bazel-bin/rules_nodejs_package
bazel build --symlink_prefix=bazel- //:rules_nodejs_package
bazel build --symlink_prefix=bazel- //:local_testing_package

for testDir in $(ls) ; do
[[ -d "$testDir" ]] || continue
Expand Down
2 changes: 1 addition & 1 deletion examples/vendored_node/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ workspace(name = "vendored_node_example")
# repository with the rules_nodejs code and we want to test them together.
local_repository(
name = "build_bazel_rules_nodejs",
path = "../../bazel-bin/rules_nodejs_package",
path = "../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "npm_install", "yarn_install")
Expand Down
2 changes: 1 addition & 1 deletion examples/webapp/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ workspace(name = "webapp_example")
# repository with the rules_nodejs code and we want to test them together.
local_repository(
name = "build_bazel_rules_nodejs",
path = "../../bazel-bin/rules_nodejs_package",
path = "../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
Expand Down

0 comments on commit e2203a9

Please sign in to comment.