1b26bf21e3
Similar to the castore-go CL before, this also updates the store-go bindings to the new layout. Change-Id: Id73d7ad43f7d70171ab021728e303300c5db71f0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9788 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
20 lines
649 B
Nix
20 lines
649 B
Nix
# Check protobuf syntax and breaking.
|
|
#
|
|
{ depot, pkgs, ... }:
|
|
|
|
pkgs.writeShellScriptBin "ci-buf-check" ''
|
|
export PATH="$PATH:${pkgs.lib.makeBinPath [ pkgs.buf pkgs.protoc-gen-go pkgs.protoc-gen-go-grpc ]}"
|
|
(cd $(git rev-parse --show-toplevel) && buf lint .)
|
|
|
|
# Check if any files have changed
|
|
if [[ -n "$(git status --porcelain -unormal)" ]]; then
|
|
echo "-----------------------------"
|
|
echo ".pb.go files need to be updated"
|
|
echo "-----------------------------"
|
|
git status -unormal
|
|
exit 1
|
|
fi
|
|
|
|
# Report-only
|
|
(cd $(git rev-parse --show-toplevel) && (buf breaking . --against "./.git#ref=HEAD~1" || true))
|
|
''
|