Skip to content

Commit 5b76920

Browse files
committed
Enhance build script to clean previous artifacts before cloning the spec repository
1 parent 4583f84 commit 5b76920

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

build.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
# Exit immediately if a command exits with a non-zero status.
44
set -e
55

6-
echo "--- Cloning external spec repository ---"
7-
# Clean up old clones and fetch the latest spec repo
6+
echo "--- Cleaning up previous build artifacts ---"
7+
# This is the new, crucial step. It removes the output of the last build.
8+
rm -rf site
89
rm -rf tmp-spec-repo
10+
11+
echo "--- Cloning external spec repository ---"
12+
# Fetch the latest spec repo
913
git clone --depth 1 https://github.com/agentcommunity/AgentInterfaceDiscovery tmp-spec-repo
1014

1115
echo "--- Moving spec docs into place ---"
12-
# Clean up the old spec files to prevent nesting on rebuild
16+
# Clean up the old spec files link/folder to prevent nesting on rebuild
1317
rm -rf docs/aid
1418
# Move the markdown files into the docs directory for MkDocs to find
1519
mv tmp-spec-repo/docs/aid docs/aid
@@ -23,4 +27,4 @@ echo "--- Staging canonical JSON Schema ---"
2327
mkdir -p site/schema/v1
2428
cp tmp-spec-repo/packages/aid-schema/aid.schema.json site/schema/v1/aid.schema.json
2529

26-
echo "--- Build complete ---"
30+
echo "--- Build complete ---"

0 commit comments

Comments
 (0)