Files
spec-kit/.github/workflows/scripts/create-github-release.sh
Ben Greene d09552fc63 fix: align Cursor agent naming to use 'cursor-agent' consistently
The Python CLI was configured to use "cursor-agent" as the agent key in
AGENT_CONFIG, causing it to search for release packages with the pattern
"spec-kit-template-cursor-agent-sh-*.zip". However, the release build
scripts were generating packages named "spec-kit-template-cursor-sh-*.zip",
resulting in a mismatch that prevented successful template downloads.

This commit updates the release scripts to use "cursor-agent" consistently
throughout, aligning with the AGENT_CONFIG key and the documented best
practice of using actual CLI tool names as dictionary keys.

Changes:
- Update ALL_AGENTS array in create-release-packages.sh
- Update case statement for cursor-agent in build_variant()
- Update release asset paths in create-github-release.sh
- Update documentation in README.md and AGENTS.md to reflect correct usage

This ensures that `specify init --ai cursor-agent` correctly finds and
downloads the matching release package from GitHub.

Fixes the bug where cursor-agent initialization would fail with "No matching
release asset found" error.

**Written with the help of a cursor agent**
2025-10-10 20:43:20 -04:00

46 lines
2.0 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
# create-github-release.sh
# Create a GitHub release with all template zip files
# Usage: create-github-release.sh <version>
if [[ $# -ne 1 ]]; then
echo "Usage: $0 <version>" >&2
exit 1
fi
VERSION="$1"
# Remove 'v' prefix from version for release title
VERSION_NO_V=${VERSION#v}
gh release create "$VERSION" \
.genreleases/spec-kit-template-copilot-sh-"$VERSION".zip \
.genreleases/spec-kit-template-copilot-ps-"$VERSION".zip \
.genreleases/spec-kit-template-claude-sh-"$VERSION".zip \
.genreleases/spec-kit-template-claude-ps-"$VERSION".zip \
.genreleases/spec-kit-template-gemini-sh-"$VERSION".zip \
.genreleases/spec-kit-template-gemini-ps-"$VERSION".zip \
.genreleases/spec-kit-template-cursor-agent-sh-"$VERSION".zip \
.genreleases/spec-kit-template-cursor-agent-ps-"$VERSION".zip \
.genreleases/spec-kit-template-opencode-sh-"$VERSION".zip \
.genreleases/spec-kit-template-opencode-ps-"$VERSION".zip \
.genreleases/spec-kit-template-qwen-sh-"$VERSION".zip \
.genreleases/spec-kit-template-qwen-ps-"$VERSION".zip \
.genreleases/spec-kit-template-windsurf-sh-"$VERSION".zip \
.genreleases/spec-kit-template-windsurf-ps-"$VERSION".zip \
.genreleases/spec-kit-template-codex-sh-"$VERSION".zip \
.genreleases/spec-kit-template-codex-ps-"$VERSION".zip \
.genreleases/spec-kit-template-kilocode-sh-"$VERSION".zip \
.genreleases/spec-kit-template-kilocode-ps-"$VERSION".zip \
.genreleases/spec-kit-template-auggie-sh-"$VERSION".zip \
.genreleases/spec-kit-template-auggie-ps-"$VERSION".zip \
.genreleases/spec-kit-template-roo-sh-"$VERSION".zip \
.genreleases/spec-kit-template-roo-ps-"$VERSION".zip \
.genreleases/spec-kit-template-codebuddy-sh-"$VERSION".zip \
.genreleases/spec-kit-template-codebuddy-ps-"$VERSION".zip \
.genreleases/spec-kit-template-q-sh-"$VERSION".zip \
.genreleases/spec-kit-template-q-ps-"$VERSION".zip \
--title "Spec Kit Templates - $VERSION_NO_V" \
--notes-file release_notes.md