mirror of
https://github.com/getsentry/sentry-for-ai.git
synced 2026-09-14 14:28:22 +08:00
765cca4683
The xAI plugin marketplace scanner (generate-plugin-index.py) resolves plugin manifests from MANIFEST_PATHS = ['.grok-plugin/plugin.json', '.claude-plugin/plugin.json']. With the manifest at the repo root it was silently ignored — components were still discovered via default paths, but any manifest-level overrides (e.g. logo) would not have been picked up. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
949 B
Bash
Executable File
27 lines
949 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# validate.sh — Validate the built Grok distribution before publishing.
|
|
#
|
|
# Grok has no published JSON Schema. We always run structural checks (the two
|
|
# manifests are valid JSON and the marketplace catalog is present), and when the
|
|
# `grok` CLI is available we additionally run its native `grok plugin validate`.
|
|
# The deploy CI now provisions the grok CLI for every build, so the full validate
|
|
# (including `grok plugin validate`) runs there as well as in local dev.
|
|
#
|
|
# Usage: validate.sh <TARGET_DIR> (a tree produced by build.sh)
|
|
|
|
set -euo pipefail
|
|
|
|
TARGET_DIR="${1:?usage: validate.sh <TARGET_DIR>}"
|
|
|
|
for f in "$TARGET_DIR/.grok-plugin/plugin.json" "$TARGET_DIR/.grok-plugin/marketplace.json"; do
|
|
[ -f "$f" ] || { echo "missing required file: $f" >&2; exit 1; }
|
|
jq empty "$f"
|
|
done
|
|
|
|
if command -v grok >/dev/null 2>&1; then
|
|
grok plugin validate "$TARGET_DIR"
|
|
fi
|
|
|
|
echo "Validated Grok dist at $TARGET_DIR."
|