mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-20 15:49:55 +00:00
Address SonarCloud quality gate
- Use [[ ]] for conditional tests in generate.sh scripts - Pin arduino/setup-protoc to full commit SHA
This commit is contained in:
2
.github/workflows/proto-version-check.yml
vendored
2
.github/workflows/proto-version-check.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
|
||||||
- name: Setup protoc
|
- name: Setup protoc
|
||||||
uses: arduino/setup-protoc@v3
|
uses: arduino/setup-protoc@f4d5893b897028ff5739576ea0409746887fa536 # v3.0.0
|
||||||
with:
|
with:
|
||||||
version: ${{ env.PROTOC_VERSION }}
|
version: ${{ env.PROTOC_VERSION }}
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ repo_root=$(git rev-parse --show-toplevel)
|
|||||||
. "$repo_root/proto-tools.env"
|
. "$repo_root/proto-tools.env"
|
||||||
|
|
||||||
actual_protoc=$(protoc --version | awk '{print $2}')
|
actual_protoc=$(protoc --version | awk '{print $2}')
|
||||||
if [ "$actual_protoc" != "$PROTOC_VERSION" ]; then
|
if [[ "$actual_protoc" != "$PROTOC_VERSION" ]]; then
|
||||||
echo "ERROR: protoc version $actual_protoc differs from pinned $PROTOC_VERSION" >&2
|
echo "ERROR: protoc version $actual_protoc differs from pinned $PROTOC_VERSION" >&2
|
||||||
echo "Install protoc $PROTOC_VERSION from https://github.com/protocolbuffers/protobuf/releases" >&2
|
echo "Install protoc $PROTOC_VERSION from https://github.com/protocolbuffers/protobuf/releases" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ repo_root=$(git rev-parse --show-toplevel)
|
|||||||
. "$repo_root/proto-tools.env"
|
. "$repo_root/proto-tools.env"
|
||||||
|
|
||||||
actual_protoc=$(protoc --version | awk '{print $2}')
|
actual_protoc=$(protoc --version | awk '{print $2}')
|
||||||
if [ "$actual_protoc" != "$PROTOC_VERSION" ]; then
|
if [[ "$actual_protoc" != "$PROTOC_VERSION" ]]; then
|
||||||
echo "ERROR: protoc version $actual_protoc differs from pinned $PROTOC_VERSION" >&2
|
echo "ERROR: protoc version $actual_protoc differs from pinned $PROTOC_VERSION" >&2
|
||||||
echo "Install protoc $PROTOC_VERSION from https://github.com/protocolbuffers/protobuf/releases" >&2
|
echo "Install protoc $PROTOC_VERSION from https://github.com/protocolbuffers/protobuf/releases" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ repo_root=$(git rev-parse --show-toplevel)
|
|||||||
. "$repo_root/proto-tools.env"
|
. "$repo_root/proto-tools.env"
|
||||||
|
|
||||||
actual_protoc=$(protoc --version | awk '{print $2}')
|
actual_protoc=$(protoc --version | awk '{print $2}')
|
||||||
if [ "$actual_protoc" != "$PROTOC_VERSION" ]; then
|
if [[ "$actual_protoc" != "$PROTOC_VERSION" ]]; then
|
||||||
echo "ERROR: protoc version $actual_protoc differs from pinned $PROTOC_VERSION" >&2
|
echo "ERROR: protoc version $actual_protoc differs from pinned $PROTOC_VERSION" >&2
|
||||||
echo "Install protoc $PROTOC_VERSION from https://github.com/protocolbuffers/protobuf/releases" >&2
|
echo "Install protoc $PROTOC_VERSION from https://github.com/protocolbuffers/protobuf/releases" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ repo_root=$(git rev-parse --show-toplevel)
|
|||||||
. "$repo_root/proto-tools.env"
|
. "$repo_root/proto-tools.env"
|
||||||
|
|
||||||
actual_protoc=$(protoc --version | awk '{print $2}')
|
actual_protoc=$(protoc --version | awk '{print $2}')
|
||||||
if [ "$actual_protoc" != "$PROTOC_VERSION" ]; then
|
if [[ "$actual_protoc" != "$PROTOC_VERSION" ]]; then
|
||||||
echo "ERROR: protoc version $actual_protoc differs from pinned $PROTOC_VERSION" >&2
|
echo "ERROR: protoc version $actual_protoc differs from pinned $PROTOC_VERSION" >&2
|
||||||
echo "Install protoc $PROTOC_VERSION from https://github.com/protocolbuffers/protobuf/releases" >&2
|
echo "Install protoc $PROTOC_VERSION from https://github.com/protocolbuffers/protobuf/releases" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ repo_root=$(git rev-parse --show-toplevel)
|
|||||||
. "$repo_root/proto-tools.env"
|
. "$repo_root/proto-tools.env"
|
||||||
|
|
||||||
actual_protoc=$(protoc --version | awk '{print $2}')
|
actual_protoc=$(protoc --version | awk '{print $2}')
|
||||||
if [ "$actual_protoc" != "$PROTOC_VERSION" ]; then
|
if [[ "$actual_protoc" != "$PROTOC_VERSION" ]]; then
|
||||||
echo "ERROR: protoc version $actual_protoc differs from pinned $PROTOC_VERSION" >&2
|
echo "ERROR: protoc version $actual_protoc differs from pinned $PROTOC_VERSION" >&2
|
||||||
echo "Install protoc $PROTOC_VERSION from https://github.com/protocolbuffers/protobuf/releases" >&2
|
echo "Install protoc $PROTOC_VERSION from https://github.com/protocolbuffers/protobuf/releases" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user