chore(nix/bufCheck): remove git status check
buf lint already happens in other individual targets, and as no generation happens in here anymore either, there's no need to check for git status to record changes anymore. Change-Id: Ieb8fc4760a61dd0f0e03f0ec388062dd2303c37a Reviewed-on: https://cl.tvl.fyi/c/depot/+/9789 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
parent
1b26bf21e3
commit
c4ea205387
1 changed files with 2 additions and 13 deletions
|
@ -1,20 +1,9 @@
|
|||
# Check protobuf syntax and breaking.
|
||||
# Check protobuf breaking. Lints already happen in individual targets.
|
||||
#
|
||||
{ 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
|
||||
|
||||
export PATH="$PATH:${pkgs.lib.makeBinPath [ pkgs.buf ]}"
|
||||
# Report-only
|
||||
(cd $(git rev-parse --show-toplevel) && (buf breaking . --against "./.git#ref=HEAD~1" || true))
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue