Skip to content

Commit 7ec10a4

Browse files
author
lkawka
committed
Add grpc generation
1 parent 0cda933 commit 7ec10a4

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

scripts/checkout_experimental_types.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ Usage: $0 [OPTIONS]
1616
Creates a new feature branch with types generated from unmerged A2A spec changes.
1717
1818
This script clones the A2A spec repository, checks out a specific branch,
19-
and creates a new local feature branch from it.
19+
and creates a new local feature branch from it.
20+
21+
The script requires uv and buf to be installed.
2022
2123
OPTIONS:
2224
-r, --spec-repo URL for the A2A spec repository.
@@ -70,6 +72,7 @@ while [[ $# -gt 0 ]]; do
7072
esac
7173
done
7274

75+
7376
TMP_WORK_DIR=$(mktemp -d)
7477
echo "Created a temporary working directory: $TMP_WORK_DIR"
7578
trap 'rm -rf -- "$TMP_WORK_DIR"' EXIT
@@ -86,8 +89,14 @@ echo "Invoking the generate_types.sh script..."
8689
GENERATED_FILE="$ROOT_DIR/src/a2a/types.py"
8790
$ROOT_DIR/scripts/generate_types.sh "$GENERATED_FILE" --input-file "$TMP_WORK_DIR/spec_repo/specification/json/a2a.json"
8891

89-
echo "Committing generated types file to the \"$FEATURE_BRANCH\" branch..."
92+
93+
echo "Running buf generate..."
9094
cd $ROOT_DIR
95+
buf generate
96+
uv run "$ROOT_DIR/scripts/grpc_gen_post_processor.py"
97+
98+
99+
echo "Committing generated types file to the \"$FEATURE_BRANCH\" branch..."
91100
git checkout -b "$FEATURE_BRANCH"
92-
git add "$GENERATED_FILE"
101+
git add "$GENERATED_FILE" "$ROOT_DIR/src/a2a/grpc"
93102
git commit -m "Experimental types"

0 commit comments

Comments
 (0)