Skip to content

Commit 7d5a3d9

Browse files
authored
Merge pull request #161 from fulsomenko/develop
Fix release workflow: guard against missing .changeset directory
2 parents c4f2fe8 + 1a1f845 commit 7d5a3d9

File tree

5 files changed

+42
-7
lines changed

5 files changed

+42
-7
lines changed

.changeset/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Changesets
2+
3+
When creating a PR, add a changeset file to describe your changes.
4+
5+
## Creating a Changeset
6+
7+
```bash
8+
nix run .#changeset
9+
```
10+
11+
Or create a file `.changeset/<descriptive-name>.md` manually:
12+
13+
```md
14+
---
15+
bump: patch
16+
---
17+
18+
Brief description of changes for the changelog
19+
```
20+
21+
## Bump Types
22+
23+
- `patch` - Bug fixes, small changes (0.1.0 → 0.1.1)
24+
- `minor` - New features, backwards compatible (0.1.0 → 0.2.0)
25+
- `major` - Breaking changes (0.1.0 → 1.0.0)
26+
27+
On merge to master, changesets are aggregated and the highest bump type determines the version increment.

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ jobs:
119119
GIT_SSH_COMMAND: "ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes -o StrictHostKeyChecking=no"
120120
run: |
121121
# Delete changesets on master (after successful publish)
122-
find .changeset -maxdepth 1 -name "*.md" ! -name "README.md" -delete
123-
git add .changeset/
122+
if [ -d ".changeset" ]; then
123+
find .changeset -maxdepth 1 -name "*.md" ! -name "README.md" -delete
124+
git add .changeset/
125+
fi
124126
git commit -m "chore: clean up changesets for v${{ steps.versions.outputs.current }}" || echo "No changesets to clean up"
125127
git push origin master || echo "Nothing to push"
126128

crates/kanban-cli/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ All CLI commands output JSON for easy parsing and scripting:
174174
```json
175175
{
176176
"success": true,
177-
"api_version": "0.1.13",
177+
"api_version": "0.2.0",
178178
"data": { ... }
179179
}
180180
```
@@ -282,8 +282,7 @@ When launching with a file path:
282282

283283
### Auto-Save Behavior
284284

285-
- **On graceful exit** (press `q` in TUI): File automatically updated with latest state
286-
- **On force quit** (Ctrl+C): Changes may be lost (graceful shutdown recommended)
285+
- **Immediate save**: Changes are saved automatically after each action
287286
- **In-memory only**: Without file argument, all data discarded on exit
288287

289288
## Logging and Diagnostics

scripts/aggregate-changelog.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ trap cleanup EXIT
1010
CURRENT_VERSION=$(grep -m1 'version = ' Cargo.toml | cut -d'"' -f2)
1111

1212
# Check for changesets (excluding README.md)
13-
changeset_count=$(find .changeset -maxdepth 1 -name "*.md" ! -name "README.md" 2>/dev/null | wc -l | tr -d ' ')
13+
if [ ! -d ".changeset" ]; then
14+
echo "No changesets to aggregate"
15+
exit 0
16+
fi
17+
18+
changeset_count=$(find .changeset -maxdepth 1 -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
1419
if [ "$changeset_count" -eq 0 ]; then
1520
echo "No changesets to aggregate"
1621
exit 0

scripts/bump-version.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ fi
8888

8989
cargo update --workspace
9090

91-
find .changeset -maxdepth 1 -name "*.md" ! -name "README.md" -delete
91+
if [ -d ".changeset" ]; then
92+
find .changeset -maxdepth 1 -name "*.md" ! -name "README.md" -delete
93+
fi
9294

9395
echo "Version bumped to $NEW_VERSION"
9496
echo "CHANGELOG.md updated"

0 commit comments

Comments
 (0)