Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add prow OWNERS file #1231

Merged
merged 15 commits into from
Apr 12, 2024
Prev Previous commit
Next Next commit
ci: ignore OWNERS file for protolock commands
  • Loading branch information
wuhuizuo committed Apr 1, 2024
commit 644d7747b1d828def765bc4c989de63247b6bdf6
13 changes: 9 additions & 4 deletions scripts/check.sh
Original file line number Diff line number Diff line change
@@ -20,15 +20,20 @@ check-protos-compatible() {
export PATH=$GOPATH/bin:$PATH

if [ ! -f "$GOPATH/bin/protolock" ]; then
GO111MODULE=off go install github.com/nilslice/protolock/cmd/protolock@v0.17.0
go install github.com/nilslice/protolock/cmd/protolock@v0.17.0
fi
which protolock || {
echo "not found protolock in PATH."
ls -l "$GOPATH/bin/protolock"
exit 1
}

if protolock status -lockdir=scripts -protoroot=proto; then
protolock commit -lockdir=scripts -protoroot=proto
if protolock status -lockdir=scripts -protoroot=proto --ignore=OWNERS; then
protolock commit -lockdir=scripts -protoroot=proto --ignore=OWNERS
else
echo "Meet break compatibility problem, please check the code."
# In order not to block local branch development, when meet break compatibility will force to update `proto.lock`.
protolock commit --force -lockdir=scripts -protoroot=proto
protolock commit --force -lockdir=scripts -protoroot=proto --ignore=OWNERS
fi
# git report error like "fatal: detected dubious ownership in repository at" when reading the host's git folder
git config --global --add safe.directory $(pwd)