diff --git a/plugins/bazel/README.md b/plugins/bazel/README.md index eba4175bc..e7644fc1a 100644 --- a/plugins/bazel/README.md +++ b/plugins/bazel/README.md @@ -16,7 +16,13 @@ The plugin has a copy of [the completion script from the git repository][1]. | Alias | Command | Description | | ------- | -------------------------------------- | ------------------------------------------------------ | -| bzb | `bazel build` | The `bazel build` command | -| bzt | `bazel test` | The `bazel test` command | -| bzr | `bazel run` | The `bazel run` command | -| bzq | `bazel query` | The `bazel query` command | +| bzb | `bazel build` | The `bazel build` command | +| bzt | `bazel test` | The `bazel test` command | +| bzr | `bazel run` | The `bazel run` command | +| bzq | `bazel query` | The `bazel query` command | + +## Functions + +| Function | Description | +| -------- | ---------------------------------------- | +| bzlmod_integrety | Generate bzlmod integrity value | diff --git a/plugins/bazel/bazel.plugin.zsh b/plugins/bazel/bazel.plugin.zsh index d239a06b5..7fc126c5c 100644 --- a/plugins/bazel/bazel.plugin.zsh +++ b/plugins/bazel/bazel.plugin.zsh @@ -3,3 +3,7 @@ alias bzb='bazel build' alias bzt='bazel test' alias bzr='bazel run' alias bzq='bazel query' + +bzlmod_integrety() { + openssl dgst -sha256 -binary $1 | openssl base64 -A | sed 's/^/sha256-/' +}