-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Update for better maintainability #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7c0f0a4
64171ec
aa08257
e83e1cd
826c3a6
0bebcf9
505b956
3f67cf2
2c1e168
84ec461
2d242b4
f04e01d
1a71b03
406521c
8d52959
4cc15ba
0e5f7ce
3bdb1d9
ee9f839
5eccac5
7c2fd50
f4b1608
f9c9cd3
d92d6f5
90f0652
895bcbe
d682f5a
0672bfc
84b61bc
da60d35
93e4156
0e49e79
5243137
a810b1b
2d89075
b03bba3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # check-release-exists.sh | ||
| # Check if a GitHub release already exists for the given version | ||
| # Usage: check-release-exists.sh <version> | ||
|
|
||
| if [[ $# -ne 1 ]]; then | ||
| echo "Usage: $0 <version>" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| VERSION="$1" | ||
|
|
||
| if gh release view "$VERSION" >/dev/null 2>&1; then | ||
| echo "exists=true" >> $GITHUB_OUTPUT | ||
| echo "Release $VERSION already exists, skipping..." | ||
| else | ||
| echo "exists=false" >> $GITHUB_OUTPUT | ||
| echo "Release $VERSION does not exist, proceeding..." | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| #!/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-sh-"$VERSION".zip \ | ||
| .genreleases/spec-kit-template-cursor-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 \ | ||
| --title "Spec Kit Templates - $VERSION_NO_V" \ | ||
| --notes-file release_notes.md |
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,7 +25,10 @@ fi | |||||||||||||||
|
|
||||||||||||||||
| echo "Building release packages for $NEW_VERSION" | ||||||||||||||||
|
|
||||||||||||||||
| rm -rf sdd-package-base* sdd-*-package-* spec-kit-template-*-"${NEW_VERSION}".zip || true | ||||||||||||||||
| # Create and use .genreleases directory for all build artifacts | ||||||||||||||||
| GENRELEASES_DIR=".genreleases" | ||||||||||||||||
| mkdir -p "$GENRELEASES_DIR" | ||||||||||||||||
| rm -rf "$GENRELEASES_DIR"/* || true | ||||||||||||||||
|
|
||||||||||||||||
| rewrite_paths() { | ||||||||||||||||
| sed -E \ | ||||||||||||||||
|
|
@@ -82,7 +85,7 @@ generate_commands() { | |||||||||||||||
|
|
||||||||||||||||
| build_variant() { | ||||||||||||||||
| local agent=$1 script=$2 | ||||||||||||||||
| local base_dir="sdd-${agent}-package-${script}" | ||||||||||||||||
| local base_dir="$GENRELEASES_DIR/sdd-${agent}-package-${script}" | ||||||||||||||||
| echo "Building $agent ($script) package..." | ||||||||||||||||
| mkdir -p "$base_dir" | ||||||||||||||||
|
|
||||||||||||||||
|
|
@@ -158,11 +161,11 @@ build_variant() { | |||||||||||||||
| mkdir -p "$base_dir/.windsurf/workflows" | ||||||||||||||||
| generate_commands windsurf md "\$ARGUMENTS" "$base_dir/.windsurf/workflows" "$script" ;; | ||||||||||||||||
| codex) | ||||||||||||||||
|
||||||||||||||||
| codex) | |
| codex) | |
| # BREAKING CHANGE: Codex integration path changed from '.codex/commands' to '.codex/prompts'. | |
| # Existing Codex integrations expecting '.codex/commands' will need to be updated. |
Copilot
AI
Sep 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The directory structure for Codex has changed from .codex/commands to .codex/prompts but this change should be documented or commented to explain why the directory structure differs from other agents.
| mkdir -p "$base_dir/.codex/prompts" | |
| generate_commands codex md "\$ARGUMENTS" "$base_dir/.codex/prompts" "$script" ;; | |
| esac | |
| # Note: Codex uses `.codex/prompts` instead of `.codex/commands` to match its expected directory structure. | |
| # This differs from other agents, which use a `commands` subdirectory. See Codex integration docs for details. | |
| mkdir -p "$base_dir/.codex/prompts" | |
| generate_commands codex md "\$ARGUMENTS" "$base_dir/.codex/prompts" "$script" ;; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # generate-release-notes.sh | ||
| # Generate release notes from git history | ||
| # Usage: generate-release-notes.sh <new_version> <last_tag> | ||
|
|
||
| if [[ $# -ne 2 ]]; then | ||
| echo "Usage: $0 <new_version> <last_tag>" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| NEW_VERSION="$1" | ||
| LAST_TAG="$2" | ||
|
|
||
| # Get commits since last tag | ||
| if [ "$LAST_TAG" = "v0.0.0" ]; then | ||
| # Check how many commits we have and use that as the limit | ||
| COMMIT_COUNT=$(git rev-list --count HEAD) | ||
| if [ "$COMMIT_COUNT" -gt 10 ]; then | ||
| COMMITS=$(git log --oneline --pretty=format:"- %s" HEAD~10..HEAD) | ||
| else | ||
| COMMITS=$(git log --oneline --pretty=format:"- %s" HEAD~$COMMIT_COUNT..HEAD 2>/dev/null || git log --oneline --pretty=format:"- %s") | ||
| fi | ||
|
localden marked this conversation as resolved.
|
||
| else | ||
| COMMITS=$(git log --oneline --pretty=format:"- %s" $LAST_TAG..HEAD) | ||
| fi | ||
|
|
||
| # Create release notes | ||
| cat > release_notes.md << EOF | ||
| Template release $NEW_VERSION | ||
|
|
||
| Updated specification-driven development templates for GitHub Copilot, Claude Code, Gemini CLI, Cursor, Qwen, opencode, Windsurf, and Codex. | ||
|
|
||
| Now includes per-script variants for POSIX shell (sh) and PowerShell (ps). | ||
|
|
||
| Download the template for your preferred AI assistant + script type: | ||
| - spec-kit-template-copilot-sh-$NEW_VERSION.zip | ||
| - spec-kit-template-copilot-ps-$NEW_VERSION.zip | ||
| - spec-kit-template-claude-sh-$NEW_VERSION.zip | ||
| - spec-kit-template-claude-ps-$NEW_VERSION.zip | ||
| - spec-kit-template-gemini-sh-$NEW_VERSION.zip | ||
| - spec-kit-template-gemini-ps-$NEW_VERSION.zip | ||
| - spec-kit-template-cursor-sh-$NEW_VERSION.zip | ||
| - spec-kit-template-cursor-ps-$NEW_VERSION.zip | ||
| - spec-kit-template-opencode-sh-$NEW_VERSION.zip | ||
| - spec-kit-template-opencode-ps-$NEW_VERSION.zip | ||
| - spec-kit-template-qwen-sh-$NEW_VERSION.zip | ||
| - spec-kit-template-qwen-ps-$NEW_VERSION.zip | ||
| - spec-kit-template-windsurf-sh-$NEW_VERSION.zip | ||
| - spec-kit-template-windsurf-ps-$NEW_VERSION.zip | ||
| - spec-kit-template-codex-sh-$NEW_VERSION.zip | ||
| - spec-kit-template-codex-ps-$NEW_VERSION.zip | ||
| EOF | ||
|
|
||
| echo "Generated release notes:" | ||
| cat release_notes.md | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # get-next-version.sh | ||
| # Calculate the next version based on the latest git tag and output GitHub Actions variables | ||
| # Usage: get-next-version.sh | ||
|
|
||
| # Get the latest tag, or use v0.0.0 if no tags exist | ||
| LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0") | ||
| echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT | ||
|
|
||
| # Extract version number and increment | ||
| VERSION=$(echo $LATEST_TAG | sed 's/v//') | ||
| IFS='.' read -ra VERSION_PARTS <<< "$VERSION" | ||
| MAJOR=${VERSION_PARTS[0]:-0} | ||
| MINOR=${VERSION_PARTS[1]:-0} | ||
| PATCH=${VERSION_PARTS[2]:-0} | ||
|
|
||
| # Increment patch version | ||
| PATCH=$((PATCH + 1)) | ||
| NEW_VERSION="v$MAJOR.$MINOR.$PATCH" | ||
|
|
||
| echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT | ||
| echo "New version will be: $NEW_VERSION" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # update-version.sh | ||
| # Update version in pyproject.toml (for release artifacts only) | ||
| # Usage: update-version.sh <version> | ||
|
|
||
| if [[ $# -ne 1 ]]; then | ||
| echo "Usage: $0 <version>" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| VERSION="$1" | ||
|
|
||
| # Remove 'v' prefix for Python versioning | ||
| PYTHON_VERSION=${VERSION#v} | ||
|
|
||
| if [ -f "pyproject.toml" ]; then | ||
| sed -i "s/version = \".*\"/version = \"$PYTHON_VERSION\"/" pyproject.toml | ||
| echo "Updated pyproject.toml version to $PYTHON_VERSION (for release artifacts only)" | ||
| else | ||
| echo "Warning: pyproject.toml not found, skipping version update" | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,3 +38,8 @@ env/ | |
| .env | ||
| .env.local | ||
| *.lock | ||
|
|
||
| # Spec Kit-specific files | ||
| .genreleases/ | ||
| *.zip | ||
| sdd-*/ | ||
Uh oh!
There was an error while loading. Please reload this page.