Skip to content

Commit

Permalink
fix bug in build.debug for protoc v comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmovses committed Feb 12, 2024
1 parent 1024138 commit a580994
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions m1/scripts/build.debug.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env bash
set -xue

if ! [[ "$0" =~ scripts/build.debug.sh ]]; then
Expand All @@ -7,8 +8,10 @@ if ! [[ "$0" =~ scripts/build.debug.sh ]]; then
fi

PROTOC_VERSION=$(protoc --version | cut -f2 -d' ')
if [[ "${PROTOC_VERSION}" == "" ]] || [[ "${PROTOC_VERSION}" < 3.15.0 ]]; then
echo "protoc must be installed and the version must be greater than 3.15.0"
MIN_VERSION="3.15"

if ! printf "%s\n%s" "$PROTOC_VERSION" "$MIN_VERSION" | sort -V | tail -n 1 | grep -q "$PROTOC_VERSION"; then
echo "protoc must be installed and the version must be greater than 3.15"
exit 255
fi

Expand All @@ -18,4 +21,4 @@ cargo build -p subnet --bin subnet
./target/debug/subnet --help

./target/debug/subnet genesis "hello world"
./target/debug/subnet vm-id subnet
./target/debug/subnet vm-id subnet

0 comments on commit a580994

Please sign in to comment.