1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-21 21:30:09 +00:00

feat(bazel): add bzlmod integrity gen function (#12797)

Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This commit is contained in:
Markus Hofbauer 2024-11-19 21:20:58 +01:00 committed by GitHub
parent 1b9d6e5c82
commit 9991822f8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 7 deletions

View file

@ -1,6 +1,7 @@
# Bazel plugin # Bazel plugin
This plugin adds completion and aliases for [bazel](https://bazel.build), an open-source build and test tool that scalably supports multi-language and multi-platform projects. This plugin adds completion and aliases for [bazel](https://bazel.build), an open-source build and test tool
that scalably supports multi-language and multi-platform projects.
To use it, add `bazel` to the plugins array in your zshrc file: To use it, add `bazel` to the plugins array in your zshrc file:
@ -15,8 +16,14 @@ The plugin has a copy of [the completion script from the git repository][1].
## Aliases ## Aliases
| Alias | Command | Description | | Alias | Command | Description |
| ------- | -------------------------------------- | ------------------------------------------------------ | | ----- | ------------- | ------------------------- |
| bzb | `bazel build` | The `bazel build` command | | bzb | `bazel build` | The `bazel build` command |
| bzt | `bazel test` | The `bazel test` command | | bzt | `bazel test` | The `bazel test` command |
| bzr | `bazel run` | The `bazel run` command | | bzr | `bazel run` | The `bazel run` command |
| bzq | `bazel query` | The `bazel query` command | | bzq | `bazel query` | The `bazel query` command |
## Functions
| Function | Description |
| -------- | -------------------------------- |
| sri-hash | Generate SRI hash used by bzlmod |

View file

@ -3,3 +3,7 @@ alias bzb='bazel build'
alias bzt='bazel test' alias bzt='bazel test'
alias bzr='bazel run' alias bzr='bazel run'
alias bzq='bazel query' alias bzq='bazel query'
sri-hash() {
openssl dgst -sha256 -binary $1 | openssl base64 -A | sed 's/^/sha256-/'
}