Skip to content

Add --update flag to sync.sh for one-step Code Cannon updates#58

Merged
sebastientaggart merged 1 commit into
devfrom
feature/sync-update-flag
Apr 8, 2026
Merged

Add --update flag to sync.sh for one-step Code Cannon updates#58
sebastientaggart merged 1 commit into
devfrom
feature/sync-update-flag

Conversation

@sebastientaggart

Copy link
Copy Markdown
Member

Adds a `--update` flag to `sync.sh` so users can update Code Cannon and regenerate skill files from their project root in one step:

```
CodeCannon/sync.sh --update
```

Behavior:

  • Checks the current branch of the CodeCannon checkout. If it's `main`, runs `git pull --ff-only` and then proceeds with the normal sync.
  • If it's on any other branch, prints a clear message and exits non-zero — no stashing, no checkout, no assumptions about expert users' setups.
  • If `git pull --ff-only` fails (dirty tree, non-ff, etc.), prints a clear error and exits.

README updated to document the new one-step update path alongside the existing submodule workflow.

Issue #57

@sebastientaggart

Copy link
Copy Markdown
Member Author

Review Summary

Verdict: APPROVE

Findings

  • [NOTE] After --update fast-forwards the CodeCannon checkout, the already-loaded sync.sh continues executing the pre-pull Python code in memory; only the skills/templates on disk reflect the new version. This is acceptable for the intended use case but worth being aware of if future updates change generator logic in ways that must take effect immediately.

@sebastientaggart
sebastientaggart merged commit 7dafd5e into dev Apr 8, 2026
2 checks passed
This was referenced Apr 8, 2026
@sebastientaggart
sebastientaggart deleted the feature/sync-update-flag branch April 8, 2026 15:32
sebastientaggart added a commit that referenced this pull request Apr 8, 2026
Add --update flag to sync.sh for one-step Code Cannon updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant