Skip to content

Commit

Permalink
fix(scripts): Warn if uniffi-bindgen version != 0.25
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarth committed Jan 29, 2024
1 parent 7b2413f commit 4c575a1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,16 @@ else
echo "uniffi-bindgen already installed, skipping."
fi

# Check uniffi-bindgen version
print_action "[ffi] Checking uniffi-bindgen version..."
UNIFFI_VERSION=$(uniffi-bindgen --version | grep -oE '0\.25\.[0-9]+' || echo "not found")
EXPECTED_VERSION_PREFIX="0.25"
if [[ $UNIFFI_VERSION != $EXPECTED_VERSION_PREFIX* ]]; then
echo -e "${RED}Error: uniffi-bindgen version is not 0.25.x. Current version: $(uniffi-bindgen --version)${DEFAULT}"
echo -e "${RED}Please uninstall uniffi-bindgen and run this script again.${DEFAULT}"
exit 1
else
echo "uniffi-bindgen version is $UNIFFI_VERSION, which is acceptable."
fi

print_action "Done! Please run ./scripts/buld_ios.sh to build for iOS."

0 comments on commit 4c575a1

Please sign in to comment.