summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bump-version.sh6
-rwxr-xr-xscripts/render-antigravity-logo.sh66
-rwxr-xr-xscripts/sync-to-codex-plugin.sh4
3 files changed, 74 insertions, 2 deletions
diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh
index 14ead00..2f3acee 100755
--- a/scripts/bump-version.sh
+++ b/scripts/bump-version.sh
@@ -188,7 +188,9 @@ cmd_audit() {
declared_paths+=("$path")
done < <(declared_files)
- # Grep for the version string
+ # Grep for the version string, but not inside a longer number such as an
+ # IP address; a "v" prefix or surrounding quotes still match.
+ local version_pattern="(^|[^0-9.])${current_version//./\\.}([^0-9]|$)"
local found_undeclared=0
while IFS= read -r match; do
local match_file
@@ -212,7 +214,7 @@ cmd_audit() {
fi
echo " $match"
fi
- done < <(grep -rn "${exclude_args[@]}" -F "$current_version" "$REPO_ROOT" 2>/dev/null || true)
+ done < <(grep -rnE "${exclude_args[@]}" "$version_pattern" "$REPO_ROOT" 2>/dev/null || true)
if [[ "$found_undeclared" -eq 0 ]]; then
echo "No undeclared files contain the version string. All clear."
diff --git a/scripts/render-antigravity-logo.sh b/scripts/render-antigravity-logo.sh
new file mode 100755
index 0000000..82a5bd8
--- /dev/null
+++ b/scripts/render-antigravity-logo.sh
@@ -0,0 +1,66 @@
+#!/usr/bin/env bash
+#
+# Render the Antigravity Marketplace logo from assets/superpowers-small.svg.
+#
+# Usage:
+# scripts/render-antigravity-logo.sh [--output PATH]
+#
+# Draws the Superpowers mark in near-black on a white rounded square with
+# transparent corners, 512x512 PNG. Run it whenever superpowers-small.svg
+# changes; tests/antigravity/test-logo.sh fails if the committed PNG is stale.
+# Requires rsvg-convert (Homebrew: librsvg).
+set -euo pipefail
+
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
+SOURCE_SVG="$REPO_ROOT/assets/superpowers-small.svg"
+OUTPUT="$REPO_ROOT/assets/antigravity-logo.png"
+
+usage() {
+ sed -n '2,11p' "$0" | sed 's/^# \{0,1\}//'
+}
+
+die() {
+ echo "error: $*" >&2
+ exit 1
+}
+
+while [[ $# -gt 0 ]]; do
+ case "$1" in
+ --output)
+ [[ $# -ge 2 ]] || die "--output needs a path"
+ OUTPUT="$2"
+ shift 2
+ ;;
+ -h | --help)
+ usage
+ exit 0
+ ;;
+ *)
+ usage >&2
+ die "unknown argument: $1"
+ ;;
+ esac
+done
+
+command -v rsvg-convert >/dev/null 2>&1 \
+ || die "rsvg-convert is not on PATH (install librsvg, e.g. 'brew install librsvg')"
+[[ -r "$SOURCE_SVG" ]] || die "source mark not readable: $SOURCE_SVG"
+
+# Everything inside the source <svg> element: the mark's paths and ellipse.
+mark="$(sed -E 's/^.*<svg[^>]*>//; s#</svg>.*$##' "$SOURCE_SVG")"
+[[ -n "$mark" ]] || die "could not extract the mark from $SOURCE_SVG"
+
+# The mark's bounding box is centered at (256,256) in its 512 viewBox and is
+# 348 units wide; scale 0.905 makes it ~70% of the 450-unit rounded square.
+composed="$(mktemp)"
+trap 'rm -f "$composed"' EXIT
+cat >"$composed" <<EOF
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
+ <rect x="31" y="31" width="450" height="450" rx="100" ry="100" fill="#ffffff"/>
+ <g fill="#1a1a1a" transform="translate(256 256) scale(0.905) translate(-256 -256)">$mark</g>
+</svg>
+EOF
+
+rsvg-convert -w 512 -h 512 "$composed" -o "$OUTPUT"
+echo "wrote $OUTPUT"
diff --git a/scripts/sync-to-codex-plugin.sh b/scripts/sync-to-codex-plugin.sh
index 8ff283a..fc80ab2 100755
--- a/scripts/sync-to-codex-plugin.sh
+++ b/scripts/sync-to-codex-plugin.sh
@@ -44,6 +44,7 @@ DEST_REL="plugins/superpowers"
# (.DS_Store is intentionally unanchored — Finder creates them everywhere.)
EXCLUDES=(
# Dotfiles and infra — top-level only
+ "/.antigravity-plugin/"
"/.claude/"
"/.claude-plugin/"
"/.codex/"
@@ -80,6 +81,9 @@ EXCLUDES=(
"/scripts/"
"/tests/"
"/tmp/"
+
+ # Other harnesses' assets
+ "/assets/antigravity-logo.png"
)
# =============================================================================