feat: add headless automation protocol and CLI
This commit is contained in:
+13
-8
@@ -1,30 +1,35 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -euo pipefail
|
||||
|
||||
# Resolve inputs from this checkout, independently of the caller's cwd.
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Generate version
|
||||
./scripts/gen-version.sh
|
||||
|
||||
# Prepare staging for SDK extra files
|
||||
echo "Preparing dist-staging..."
|
||||
rm -rf dist-staging/devtools/debugger-protocol
|
||||
|
||||
mkdir -p dist-staging/devtools/debugger-protocol
|
||||
mkdir -p dist-staging/devtools/headless-protocol dist-staging/docs/runtime
|
||||
|
||||
cp devtools/debugger-protocol/protocol.json dist-staging/devtools/debugger-protocol/
|
||||
|
||||
cp VERSION.txt dist-staging/devtools/debugger-protocol/VERSION.txt
|
||||
cp devtools/headless-protocol/*.json dist-staging/devtools/headless-protocol/
|
||||
cp VERSION.txt dist-staging/devtools/headless-protocol/VERSION.txt
|
||||
cp docs/specs/runtime/11a-headless-automation-protocol.md dist-staging/docs/runtime/
|
||||
|
||||
# Clean and prepare the version-specific directory
|
||||
echo "Cleaning dist-staging/stable..."
|
||||
echo "Preparing dist-staging/stable (existing archives are retained)..."
|
||||
mkdir -p "dist-staging/stable"
|
||||
rm -rf "dist-staging/stable/*"
|
||||
|
||||
# Build stable using cargo build
|
||||
dist build
|
||||
dist build "$@"
|
||||
|
||||
echo "Copying target/distrib content to dist-staging/stable..."
|
||||
if [ -d "target/distrib" ] && [ "$(ls -A target/distrib)" ]; then
|
||||
cp -r target/distrib/* "dist-staging/stable/"
|
||||
else
|
||||
echo "Warning: target/dist directory not found or empty."
|
||||
fi
|
||||
echo "Error: target/distrib directory not found or empty." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user