Skip to content

Commit bca0a8b

Browse files
authored
Update development docs to include bazel update instructions (#1118)
* Update development docs to include bazel update instructions * Tidy up shell output * Multiline command * Tweak * sg generate is required! * Tweak sg generate instruction
1 parent a9118d5 commit bca0a8b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

DEVELOPMENT.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,20 @@ We adhere to the [general Sourcegraph principles for testing](https://docs.sourc
7171
3. The [releases section of the repo sidebar](https://github.com/sourcegraph/src-cli) shows the correct version.
7272
5. Make the necessary updates to the main Sourcegraph repo:
7373
1. Update the `MinimumVersion` constant in the [src-cli package](https://github.com/sourcegraph/sourcegraph/tree/main/internal/src-cli/consts.go).
74-
2. Update the reference documentation by running `go generate ./doc/cli/references`.
75-
3. Commit the changes, and open a PR.
74+
2. Update the `SRC_CLI_VERSION` in [tool_deps.bzl](https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph@f88ee515885e1761f002f8adcc73560bcb2573ee/-/blob/dev/tool_deps.bzl?L6)
75+
3. Update the sha256 hashes for the three `src-cli-*` targets in [tool_deps.bzl](https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph@f88ee515885e1761f002f8adcc73560bcb2573ee/-/blob/dev/tool_deps.bzl?L113-133). The easiest way to do this is to run the following command after updating `SRC_CLI_VERSION`, and extract the correct checksums for each target from the error message:
76+
```shell
77+
$ bazel build @src-cli-linux-amd64//:src-cli-linux-amd64 \
78+
@src-cli-darwin-amd64//:src-cli-darwin-amd64 \
79+
@src-cli-darwin-arm64//:src-cli-darwin-arm64
80+
81+
ERROR: java.io.IOException: Error downloading [...]_linux-amd64.tar.gz [...] Checksum was <new linux-amd64 checksum>
82+
83+
[...]
84+
```
85+
After updating the checksums, rerun the command to verify that the values are correct.
86+
4. Run `sg generate bazel` (this may not result in any changes)
87+
4. Commit the changes, and open a PR.
7688
6. Once the version bump PR is merged and the commit is live on dotcom, check that the [curl commands in the README](README.md#installation) also fetch the new latest version.
7789

7890
### Patch releases

0 commit comments

Comments
 (0)