Skip to content

Commit a68729b

Browse files
committed
add node version check
1 parent 8af7170 commit a68729b

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

pnpm-lock.yaml

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build.sh

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#!/bin/bash
22

3+
# Check Node.js version
4+
REQUIRED_NODE_VERSION=23
5+
CURRENT_NODE_VERSION=$(node -v | cut -d'.' -f1 | sed 's/v//')
6+
7+
if (( CURRENT_NODE_VERSION < REQUIRED_NODE_VERSION )); then
8+
echo "Error: Node.js version must be $REQUIRED_NODE_VERSION or higher. Current version is $CURRENT_NODE_VERSION."
9+
exit 1
10+
fi
11+
312
# Navigate to the script's directory
413
cd "$(dirname "$0")"/..
514

0 commit comments

Comments
 (0)