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

script: fix broken CI #1238

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions scripts/check.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -e

check_protoc_version() {
version=$(protoc --version)
major=$(echo ${version} | sed -n -e 's/.*\([0-9]\{1,\}\)\.[0-9]\{1,\}\.[0-9]\{1,\}.*/\1/p')
Expand All @@ -23,12 +25,12 @@ check-protos-compatible() {
GO111MODULE=off go install github.com/nilslice/protolock/cmd/[email protected]
fi

if protolock status -lockdir=scripts -protoroot=proto; then
protolock commit -lockdir=scripts -protoroot=proto
if $GOPATH/bin/protolock status -lockdir=scripts -protoroot=proto; then
$GOPATH/bin/protolock commit -lockdir=scripts -protoroot=proto
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
$GOPATH/bin/protolock commit --force -lockdir=scripts -protoroot=proto
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)
Expand Down
Loading