Skip to content

Commit

Permalink
chore: update to bazelisk 1.4 (#1837)
Browse files Browse the repository at this point in the history
It includes a "bazel" bin so we don't have to use "bazelisk" command anymore
  • Loading branch information
alexeagle authored Apr 17, 2020
1 parent 40797d3 commit 0eda43f
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 55 deletions.
5 changes: 5 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ stylesheet: docs
First, you need Bazel.
We recommend using Bazelisk, which is a version-selection wrapper, similar to
the `nvm` tool managing your version of Node. This is available on npm.
We also recommend installing `ibazel` which is the "watch mode" for Bazel.

```sh
$ yarn add -D @bazel/bazelisk @bazel/ibazel
Expand All @@ -17,8 +18,12 @@ $ npm install --save-dev @bazel/bazelisk @bazel/ibazel
```

> You could install a current bazel distribution, following the [bazel instructions].
> If you use Bazelisk, see [this workaround](https://github.com/bazelbuild/bazelisk/issues/29#issuecomment-478062147) to get working command-line completion.
> It's reasonable to globally-install bazelisk so you get a `bazel` command in your $PATH.
> We don't recommend this with ibazel as the version is frequently changing.
Next, create a `WORKSPACE` file in your project root (or edit the existing one)
containing:

Expand Down
12 changes: 6 additions & 6 deletions examples/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@babel/cli": "^7.6.0",
"@babel/core": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"@bazel/bazelisk": "^1.3.0",
"@bazel/bazelisk": "^1.4.0",
"@bazel/benchmark-runner": "^0.1.0",
"@bazel/buildifier": "^2.2.1",
"@bazel/ibazel": "^0.12.4",
Expand Down Expand Up @@ -64,13 +64,13 @@
"typescript": "3.8.3"
},
"scripts": {
"build": "bazelisk build //src:prodapp",
"build": "bazel build //src:prodapp",
"serve": "ibazel run //src:devserver",
"deploy": "ng build && firebase deploy",
"serve-prod": "bazelisk run //src:prodserver",
"serve-ssr": "bazelisk run //src:universal_server",
"e2e": "bazelisk test //e2e:all",
"test": "bazelisk test //src/...",
"serve-prod": "bazel run //src:prodserver",
"serve-ssr": "bazel run //src:universal_server",
"e2e": "bazel test //e2e:all",
"test": "bazel test //src/...",
"benchmark": "ibazel-benchmark-runner //src:devserver src/app/hello-world/hello-world.component.ts --url=http://localhost:5432",
"postinstall": "ngcc",
"generate": "node tools/generator/index.js",
Expand Down
8 changes: 4 additions & 4 deletions examples/angular/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -795,10 +795,10 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"

"@bazel/bazelisk@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.3.0.tgz#dc312dd30ad01e9af86e53b40795ab6e545fa55b"
integrity sha512-73H1nq3572tTf+dhDT86aWQN+LCyfxrh05jabqPXp6cpR8soxte3gS5oUqkN36fUe+J2HzNiV4CXZTz4Xytd3Q==
"@bazel/bazelisk@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.4.0.tgz#401d7b89b8d89dd579d1e16cc24cd4d9281a4fbb"
integrity sha512-VNI/jF7baQiBy4x+u8gmSDsFehqaAuzMyLuCj0j6/aZCZSw2OssytJVj73m8sFYbXgj67D8iYEQ0gbuoafDk6w==

"@bazel/benchmark-runner@^0.1.0":
version "0.1.0"
Expand Down
12 changes: 6 additions & 6 deletions examples/angular_bazel_architect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "bazelisk run :serve",
"build": "bazelisk build :build",
"test": "bazelisk test :test",
"lint": "bazelisk run :lint",
"e2e": "bazelisk test :e2e",
"start": "bazel run :serve",
"build": "bazel build :build",
"test": "bazel test :test",
"lint": "bazel run :lint",
"e2e": "bazel test :e2e",
"postinstall": "patch-package && ngcc --properties es2015 browser module main --first-only"
},
"private": true,
Expand All @@ -33,7 +33,7 @@
"@angular/cli": "9.0.1",
"@angular/compiler-cli": "9.0.0",
"@angular/language-service": "9.0.0",
"@bazel/bazelisk": "^1.3.0",
"@bazel/bazelisk": "^1.4.0",
"@bazel/buildifier": "^2.2.1",
"@bazel/ibazel": "^0.12.4",
"@types/jasmine": "~3.3.8",
Expand Down
8 changes: 4 additions & 4 deletions examples/angular_bazel_architect/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1029,10 +1029,10 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"

"@bazel/bazelisk@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.3.0.tgz#dc312dd30ad01e9af86e53b40795ab6e545fa55b"
integrity sha512-73H1nq3572tTf+dhDT86aWQN+LCyfxrh05jabqPXp6cpR8soxte3gS5oUqkN36fUe+J2HzNiV4CXZTz4Xytd3Q==
"@bazel/bazelisk@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.4.0.tgz#401d7b89b8d89dd579d1e16cc24cd4d9281a4fbb"
integrity sha512-VNI/jF7baQiBy4x+u8gmSDsFehqaAuzMyLuCj0j6/aZCZSw2OssytJVj73m8sFYbXgj67D8iYEQ0gbuoafDk6w==

"@bazel/buildifier@^2.2.1":
version "2.2.1"
Expand Down
10 changes: 5 additions & 5 deletions examples/angular_view_engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@babel/cli": "^7.6.0",
"@babel/core": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"@bazel/bazelisk": "^1.3.0",
"@bazel/bazelisk": "^1.4.0",
"@bazel/benchmark-runner": "^0.1.0",
"@bazel/buildifier": "^2.2.1",
"@bazel/ibazel": "^0.12.4",
Expand Down Expand Up @@ -65,12 +65,12 @@
"typescript": "3.4.5"
},
"scripts": {
"build": "bazelisk build //src:prodapp",
"build": "bazel build //src:prodapp",
"serve": "ibazel run //src:devserver",
"deploy": "ng build && firebase deploy",
"serve-prod": "bazelisk run //src:prodserver",
"e2e": "bazelisk test //e2e:all",
"test": "bazelisk test //src/...",
"serve-prod": "bazel run //src:prodserver",
"e2e": "bazel test //e2e:all",
"test": "bazel test //src/...",
"benchmark": "ibazel-benchmark-runner //src:devserver src/app/hello-world/hello-world.component.ts --url=http://localhost:5432",
"postinstall": "patch-package && ngc -p angular-metadata.tsconfig.json",
"generate": "node tools/generator/index.js",
Expand Down
8 changes: 4 additions & 4 deletions examples/angular_view_engine/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -803,10 +803,10 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"

"@bazel/bazelisk@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.3.0.tgz#dc312dd30ad01e9af86e53b40795ab6e545fa55b"
integrity sha512-73H1nq3572tTf+dhDT86aWQN+LCyfxrh05jabqPXp6cpR8soxte3gS5oUqkN36fUe+J2HzNiV4CXZTz4Xytd3Q==
"@bazel/bazelisk@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.4.0.tgz#401d7b89b8d89dd579d1e16cc24cd4d9281a4fbb"
integrity sha512-VNI/jF7baQiBy4x+u8gmSDsFehqaAuzMyLuCj0j6/aZCZSw2OssytJVj73m8sFYbXgj67D8iYEQ0gbuoafDk6w==

"@bazel/benchmark-runner@^0.1.0":
version "0.1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/nestjs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"dependencies": {
"@bazel/bazelisk": "^1.3.0",
"@bazel/bazelisk": "^1.4.0",
"@bazel/ibazel": "^0.12.4",
"@bazel/jasmine": "^1.6.0",
"@nestjs/common": "6.5.2",
Expand Down
8 changes: 4 additions & 4 deletions examples/nestjs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# yarn lockfile v1


"@bazel/bazelisk@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.3.0.tgz#dc312dd30ad01e9af86e53b40795ab6e545fa55b"
integrity sha512-73H1nq3572tTf+dhDT86aWQN+LCyfxrh05jabqPXp6cpR8soxte3gS5oUqkN36fUe+J2HzNiV4CXZTz4Xytd3Q==
"@bazel/bazelisk@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.4.0.tgz#401d7b89b8d89dd579d1e16cc24cd4d9281a4fbb"
integrity sha512-VNI/jF7baQiBy4x+u8gmSDsFehqaAuzMyLuCj0j6/aZCZSw2OssytJVj73m8sFYbXgj67D8iYEQ0gbuoafDk6w==

"@bazel/ibazel@^0.12.4":
version "0.12.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/react_webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"devDependencies": {
"@bazel/bazelisk": "^1.3.0",
"@bazel/bazelisk": "^1.4.0",
"@bazel/buildifier": "^2.2.1",
"@bazel/ibazel": "^0.12.4",
"@bazel/typescript": "^1.6.0",
Expand Down
8 changes: 4 additions & 4 deletions examples/react_webpack/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# yarn lockfile v1


"@bazel/bazelisk@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.3.0.tgz#dc312dd30ad01e9af86e53b40795ab6e545fa55b"
integrity sha512-73H1nq3572tTf+dhDT86aWQN+LCyfxrh05jabqPXp6cpR8soxte3gS5oUqkN36fUe+J2HzNiV4CXZTz4Xytd3Q==
"@bazel/bazelisk@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.4.0.tgz#401d7b89b8d89dd579d1e16cc24cd4d9281a4fbb"
integrity sha512-VNI/jF7baQiBy4x+u8gmSDsFehqaAuzMyLuCj0j6/aZCZSw2OssytJVj73m8sFYbXgj67D8iYEQ0gbuoafDk6w==

"@bazel/buildifier@^2.2.1":
version "2.2.1"
Expand Down
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@babel/cli": "^7.6.2",
"@babel/core": "^7.6.2",
"@babel/preset-env": "^7.6.2",
"@bazel/bazelisk": "^1.3.0",
"@bazel/bazelisk": "^1.4.0",
"@bazel/buildifier": "^0.26.0",
"@bazel/buildozer": "^0.29.0",
"@bazel/ibazel": "^0.10.3",
Expand Down Expand Up @@ -95,15 +95,14 @@
"**/jest-serializer": "24.3.0"
},
"scripts": {
"test": "bazelisk test --test_tag_filters=-e2e,-examples,-manual,-browser:firefox-local",
"test_windows": "bazelisk test --test_tag_filters=-e2e,-examples,-fix-windows,-manual,-browser:firefox-local",
"test_e2e": "bazelisk --host_jvm_args=-Xms256m --host_jvm_args=-Xmx1280m test --test_tag_filters=e2e --local_ram_resources=792 --test_arg=--local_ram_resources=13288",
"test_examples": "bazelisk --host_jvm_args=-Xms256m --host_jvm_args=-Xmx1280m test --test_tag_filters=examples --local_ram_resources=792 --test_arg=--local_ram_resources=13288",
"run_integration_test": "bazelisk --host_jvm_args=-Xms256m --host_jvm_args=-Xmx1280m run --local_ram_resources=792 --test_arg=--local_ram_resources=13288",
"test": "bazel test --test_tag_filters=-e2e,-examples,-manual,-browser:firefox-local",
"test_windows": "bazel test --test_tag_filters=-e2e,-examples,-fix-windows,-manual,-browser:firefox-local",
"test_e2e": "bazel --host_jvm_args=-Xms256m --host_jvm_args=-Xmx1280m test --test_tag_filters=e2e --local_ram_resources=792 --test_arg=--local_ram_resources=13288",
"test_examples": "bazel --host_jvm_args=-Xms256m --host_jvm_args=-Xmx1280m test --test_tag_filters=examples --local_ram_resources=792 --test_arg=--local_ram_resources=13288",
"run_integration_test": "bazel --host_jvm_args=-Xms256m --host_jvm_args=-Xmx1280m run --local_ram_resources=792 --test_arg=--local_ram_resources=13288",
"run_integration_test_debug": "yarn run_integration_test --define=BAZEL_INTEGRATION_TEST_DEBUG=1",
"test_all": "./scripts/test_all.sh",
"clean_all": "./scripts/clean_all.sh",
"bazel": "bazelisk",
"// Unchecked warnings": "The following warnings are not checked as disabling them locally is broken",
"// rule-impl-return": "./internal/common/typescript_mock_lib.bzl:29: rule-impl-return: Avoid using the legacy provider syntax. (https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#rule-impl-return)",
"// rule-impl-return(2)": "./packages/typescript/internal/protobufjs/ts_proto_library.bzl:105: rule-impl-return: Avoid using the legacy provider syntax. (https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#rule-impl-return)",
Expand All @@ -121,7 +120,7 @@
"update-codeowners": "./scripts/update_codeowners.sh",
"format": "git-clang-format",
"format-all": "clang-format --glob='{internal/**/,examples/**/}*.{js,ts}' -i",
"stardoc": "bazelisk build //docs && cp -f dist/bin/docs/*.md docs",
"stardoc": "bazel build //docs && cp -f dist/bin/docs/*.md docs",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && node ./scripts/on-version.js && bazel build //:release && node ./scripts/on-release.js && git stage version.bzl docs/install.md packages/create/index.js README.md CHANGELOG.md e2e/*/WORKSPACE examples/*/WORKSPACE",
"postinstall": "patch-package && node internal/npm_install/test/postinstall.js"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ bazel-out
private: true,
devDependencies,
scripts: {
'build': 'bazelisk build //...',
'test': 'bazelisk test //...',
'build': 'bazel build //...',
'test': 'bazel test //...',
}
},
null, 4));
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -u -e -o pipefail
# $ npm login --registry https://wombat-dressing-room.appspot.com

readonly NPM_COMMAND=${1:-publish}
readonly BAZEL_BIN=./node_modules/.bin/bazelisk
readonly BAZEL_BIN=./node_modules/.bin/bazel

# Use a new output_base so we get a clean build
# Bazel can't know if the git metadata changed
Expand Down
2 changes: 1 addition & 1 deletion scripts/update_codeowners.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Update the owners=[] attribute in //.github:gen_codeowners

BAZEL=./node_modules/.bin/bazelisk
BAZEL=./node_modules/.bin/bazel
BUILDOZER=./node_modules/.bin/buildozer

readonly new_owners=$(
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -937,10 +937,10 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"

"@bazel/bazelisk@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.3.0.tgz#dc312dd30ad01e9af86e53b40795ab6e545fa55b"
integrity sha512-73H1nq3572tTf+dhDT86aWQN+LCyfxrh05jabqPXp6cpR8soxte3gS5oUqkN36fUe+J2HzNiV4CXZTz4Xytd3Q==
"@bazel/bazelisk@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.4.0.tgz#401d7b89b8d89dd579d1e16cc24cd4d9281a4fbb"
integrity sha512-VNI/jF7baQiBy4x+u8gmSDsFehqaAuzMyLuCj0j6/aZCZSw2OssytJVj73m8sFYbXgj67D8iYEQ0gbuoafDk6w==

"@bazel/[email protected]":
version "0.26.0"
Expand Down

0 comments on commit 0eda43f

Please sign in to comment.