Skip to content

Commit e64fd7d

Browse files
wesmclaude
andcommitted
Add extra instructions argument to changelog/release scripts
Usage: ./scripts/release.sh 0.2.0 "Focus on TUI improvements" The extra instructions are appended to the changelog prompt. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 10914d8 commit e64fd7d

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

scripts/changelog.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/bin/bash
22
# Generate a changelog since the last release using codex
3-
# Usage: ./scripts/changelog.sh [version]
3+
# Usage: ./scripts/changelog.sh [version] [extra_instructions]
44
# If version is not provided, uses "NEXT" as placeholder
55

66
set -e
77

88
VERSION="${1:-NEXT}"
9+
EXTRA_INSTRUCTIONS="$2"
910

1011
# Find the previous tag
1112
PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
@@ -34,9 +35,12 @@ echo "Using codex to generate changelog..." >&2
3435
TMPFILE=$(mktemp)
3536
trap 'rm -f "$TMPFILE"' EXIT
3637

37-
codex exec --skip-git-repo-check -c reasoning_effort=high -o "$TMPFILE" - >/dev/null <<EOF
38+
codex exec --skip-git-repo-check --sandbox read-only -c reasoning_effort=high -o "$TMPFILE" - >/dev/null <<EOF
3839
You are generating a changelog for roborev version $VERSION.
3940
41+
IMPORTANT: Do NOT use any tools. Do NOT run any shell commands. Do NOT search or read any files.
42+
All the information you need is provided below. Simply analyze the commit messages and output the changelog.
43+
4044
Here are the commits since the last release:
4145
$COMMITS
4246
@@ -51,6 +55,11 @@ Please generate a concise, user-focused changelog. Group changes into sections l
5155
Focus on user-visible changes. Skip internal refactoring unless it affects users.
5256
Keep descriptions brief (one line each). Use present tense.
5357
Do NOT mention bugs that were introduced and fixed within this same release cycle.
58+
${EXTRA_INSTRUCTIONS:+
59+
60+
When writing the changelog, look for these features or improvements in the commit log above: $EXTRA_INSTRUCTIONS
61+
Do NOT search files, read code, or do any analysis outside of the commit log provided above.
62+
Do NOT search for .roborev.toml or any other files. .roborev.toml is simply a feature of the project mentioned in commits.}
5463
Output ONLY the changelog content, no preamble.
5564
EOF
5665

scripts/release.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ set -e
44
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
55

66
VERSION="$1"
7+
EXTRA_INSTRUCTIONS="$2"
78

89
if [ -z "$VERSION" ]; then
9-
echo "Usage: $0 <version>"
10+
echo "Usage: $0 <version> [extra_instructions]"
1011
echo "Example: $0 0.2.0"
12+
echo "Example: $0 0.2.0 \"Focus on TUI improvements\""
1113
exit 1
1214
fi
1315

@@ -36,7 +38,7 @@ CHANGELOG_FILE=$(mktemp)
3638
trap 'rm -f "$CHANGELOG_FILE"' EXIT
3739

3840
# Use changelog.sh to generate the changelog
39-
"$SCRIPT_DIR/changelog.sh" "$VERSION" > "$CHANGELOG_FILE"
41+
"$SCRIPT_DIR/changelog.sh" "$VERSION" "$EXTRA_INSTRUCTIONS" > "$CHANGELOG_FILE"
4042

4143
echo ""
4244
echo "=========================================="

0 commit comments

Comments
 (0)