Skip to content

fix: template nesting#4

Merged
rochecompaan merged 10 commits intomainfrom
rcompaan/fix-template-level
Mar 7, 2026
Merged

fix: template nesting#4
rochecompaan merged 10 commits intomainfrom
rcompaan/fix-template-level

Conversation

@rochecompaan
Copy link
Contributor

This refactor makes template-starter reliably generate a nested Copier template
repo and cleans up the two-phase bootstrap flow.

1.Nested template output is now correct

  • Starter renders a generated repo with:
    • root copier.yml, README.md, .github/workflows/template-correctness.yaml
    • inner template/ payload for second-stage rendering
  • Deferred files (like inner answers file) are preserved with proper Jinja/raw handling.

2.Two-phase post-copy logic is explicit and maintainable

  • Replaced shell orchestration with Python phase scripts:
    • template/.scaf/starter-post-copy.py.jinja (starter phase)
    • template/template/.scaf/post-copy.py.jinja (generated-template phase)
  • copier.yml tasks now run these Python scripts directly.

3.Semantic-release dependency init behavior fixed

  • If semantic-release is enabled, dependency install runs in both phases.
  • Starter phase safely handles unresolved Jinja in dependency files before installing.
  • Final template still uses its normal scripts/init-dev.sh flow.

4.Git bootstrap improvements

  • Both phases now:
    • init git repo when missing
    • optionally configure/create remote
    • create an initial commit automatically when repo was newly initialized
  • Initial commit uses template author/email and --no-verify to avoid hook bootstrap failures.

@rochecompaan rochecompaan merged commit 28920e4 into main Mar 7, 2026
2 checks passed
getscaf-release-bot bot pushed a commit that referenced this pull request Mar 7, 2026
## [1.1.2](v1.1.1...v1.1.2) (2026-03-07)

### Bug Fixes

* template nesting ([#4](#4)) ([28920e4](28920e4))
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