Skip to content

Commit

Permalink
Add /tools/* to release package (#537)
Browse files Browse the repository at this point in the history
* Add /tools/* to release package

* Fix CI

* Use local_testing_package in remaining e2e tests

* Lint fix
  • Loading branch information
gregmagolan authored Feb 7, 2019
1 parent 9e690a8 commit 739273e
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 20 deletions.
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ npm_package(
"//internal/npm_install:package_contents",
"//internal/npm_package:package_contents",
"//internal/web_package:package_contents",
"//tools:package_contents",
],
)

Expand Down
5 changes: 4 additions & 1 deletion internal/e2e/bazel_workspaces/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace(name = "bazel_workspaces")

local_repository(
name = "build_bazel_rules_nodejs",
path = "../../..",
path = "../../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
Expand All @@ -11,6 +11,9 @@ node_repositories()

yarn_install(
name = "npm",
# Need to a reference to this workspace in data so that
# the external/bazel_workspaces is setup before yarn_install runs
data = ["@bazel_workspaces//:package.json"],
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
Expand Down
2 changes: 1 addition & 1 deletion internal/e2e/bazel_workspaces/npm/test_workspace/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace(name = "test_workspace")

local_repository(
name = "build_bazel_rules_nodejs",
path = "../../../../..",
path = "../../../../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
Expand Down
6 changes: 3 additions & 3 deletions internal/e2e/bazel_workspaces/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dependencies": {
"test_workspaces": "file:../build_bazel_rules_nodejs/internal/e2e/bazel_workspaces/npm/test_workspace"
"test_workspaces": "file:../bazel_workspaces/npm/test_workspace"
},
"scripts": {
"test": "bazel test @test_workspace//..."
"test": "bazel test @test_workspace//..."
}
}
}
5 changes: 4 additions & 1 deletion internal/e2e/bazel_workspaces_compat/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace(name = "bazel_workspaces_compat")

local_repository(
name = "build_bazel_rules_nodejs",
path = "../../..",
path = "../../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
Expand All @@ -11,6 +11,9 @@ node_repositories()

yarn_install(
name = "npm",
# Need to a reference to this workspace in data so that
# the external/bazel_workspaces is setup before yarn_install runs
data = ["@bazel_workspaces_compat//:package.json"],
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace(name = "test_workspace")

local_repository(
name = "build_bazel_rules_nodejs",
path = "../../../../..",
path = "../../../../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace(name = "test_workspace")

local_repository(
name = "build_bazel_rules_nodejs",
path = "../../../../..",
path = "../../../../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace(name = "test_workspace")

local_repository(
name = "build_bazel_rules_nodejs",
path = "../../../../..",
path = "../../../../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")
Expand Down
10 changes: 5 additions & 5 deletions internal/e2e/bazel_workspaces_compat/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"dependencies": {
"test_workspace_a": "file:../build_bazel_rules_nodejs/internal/e2e/bazel_workspaces_compat/npm/test_workspace_a",
"test_workspace_b": "file:../build_bazel_rules_nodejs/internal/e2e/bazel_workspaces_compat/npm/test_workspace_b",
"test_workspace_c": "file:../build_bazel_rules_nodejs/internal/e2e/bazel_workspaces_compat/npm/test_workspace_c"
"test_workspace_a": "file:../bazel_workspaces_compat/npm/test_workspace_a",
"test_workspace_b": "file:../bazel_workspaces_compat/npm/test_workspace_b",
"test_workspace_c": "file:../bazel_workspaces_compat/npm/test_workspace_c"
},
"scripts": {
"test": "bazel test @test_workspace//..."
"test": "bazel test @test_workspace//..."
}
}
}
2 changes: 1 addition & 1 deletion internal/e2e/fine_grained_symlinks/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace(name = "fine_grained_symlinks")

local_repository(
name = "build_bazel_rules_nodejs",
path = "../../..",
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 internal/e2e/node_loader_no_preserve_symlinks/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace(name = "node_loader_e2e_no_preserve_symlinks")

local_repository(
name = "build_bazel_rules_nodejs",
path = "../../..",
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 internal/e2e/node_loader_preserve_symlinks/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace(name = "node_loader_e2e_preserve_symlinks")

local_repository(
name = "build_bazel_rules_nodejs",
path = "../../..",
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 internal/e2e/packages/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ workspace(name = "packages_example")

local_repository(
name = "build_bazel_rules_nodejs",
path = "../../..",
path = "../../../bazel-bin/local_testing_package",
)

load("@build_bazel_rules_nodejs//:package.bzl", "check_rules_nodejs_version")
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"internal-e2e-fine_grained_symlinks": "cd internal/e2e/fine_grained_symlinks && yarn test",
"internal-e2e-node_loader_no_preserve_symlinks": "cd internal/e2e/node_loader_no_preserve_symlinks && yarn test",
"internal-e2e-node_loader_preserve_symlinks": "cd internal/e2e/node_loader_preserve_symlinks && yarn test",
"test:e2e": "yarn internal-e2e-bazel_workspaces && yarn internal-e2e-bazel_workspaces_compat && yarn internal-e2e-fine_grained_symlinks && yarn internal-e2e-node_loader_no_preserve_symlinks && yarn internal-e2e-node_loader_preserve_symlinks",
"test:e2e": "bazel build --symlink_prefix=bazel- //:local_testing_package && yarn internal-e2e-bazel_workspaces && yarn internal-e2e-bazel_workspaces_compat && yarn internal-e2e-fine_grained_symlinks && yarn internal-e2e-node_loader_no_preserve_symlinks && yarn internal-e2e-node_loader_preserve_symlinks",
"test:examples": "./examples/test_examples.sh",
"test": "yarn test:examples && yarn test:e2e",
"bazel:format": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=args-order,attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-actions,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,out-of-order-load,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unsorted-dict-items,unused-variable",
Expand Down
20 changes: 19 additions & 1 deletion tools/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# Marker file that this directory is a bazel package
# Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

filegroup(
name = "package_contents",
srcs = glob(["*"]),
visibility = ["//:__pkg__"],
)

0 comments on commit 739273e

Please sign in to comment.