-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: ignore OWNERS file for protolock commands
- Loading branch information
Showing
1 changed file
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,13 +22,18 @@ check-protos-compatible() { | |
if [ ! -f "$GOPATH/bin/protolock" ]; then | ||
GO111MODULE=off go install github.com/nilslice/protolock/cmd/[email protected] | ||
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) | ||
|