Skip to content

Commit d790602

Browse files
authored
fix: check uv before model generation (#78)
1 parent 8c7b5fb commit d790602

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

generate_models.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ if ! command -v git &> /dev/null; then
2727
exit 1
2828
fi
2929

30+
# Check if uv is installed before cloning or modifying generated files
31+
if ! command -v uv &> /dev/null; then
32+
echo "Error: uv not found."
33+
echo "Please install uv: curl -LsSf https://astral.sh/uv/install.sh | sh"
34+
exit 1
35+
fi
36+
3037
# UCP Version to use (if provided, use release/$1 branch; otherwise, use main)
3138
if [ -z "$1" ]; then
3239
BRANCH="main"
@@ -60,13 +67,6 @@ uv run python preprocess_schemas.py
6067

6168
echo "Generating Pydantic models from preprocessed schemas..."
6269

63-
# Check if uv is installed
64-
if ! command -v uv &> /dev/null; then
65-
echo "Error: uv not found."
66-
echo "Please install uv: curl -LsSf https://astral.sh/uv/install.sh | sh"
67-
exit 1
68-
fi
69-
7070
# Ensure output directory is clean
7171
rm -r -f "$OUTPUT_DIR"
7272
mkdir -p "$OUTPUT_DIR"

0 commit comments

Comments
 (0)