tidy: document MODULE.bazel.lock maintencance

This commit is contained in:
Malte Poll 2024-05-22 15:41:20 +02:00
parent 162e73de72
commit b86faadfcc
2 changed files with 10 additions and 1 deletions

View File

@ -51,7 +51,9 @@ jobs:
- name: Run Bazel tidy
shell: bash
run: bazel run //:tidy
run: |
bazel run //:tidy
bazel mod deps --lockfile_mode=update
- name: Check if untidy
id: untidy

View File

@ -3,6 +3,13 @@
Bazel is the primary build system for this project. It is used to build all Go code and will be used to build all artifacts in the future.
Still, we aim to keep the codebase compatible with `go build` and `go test` as well.
Whenever Go code is changed, you will have to run `bazel run //:tidy` to regenerate the Bazel build files for Go code.
Additionally, you need to update `MODULE.bazel`, together with `MODULE.bazel.lock`:
```
# if the steps below fail, try to recreate the lockfile from scratch by deleting it
bazel mod deps --lockfile_mode=update
bazel mod tidy
```
## Bazel commands