Skip to content

Commit 43d1411

Browse files
authored
fix(cli): bundle codegen templates into wheels-module tar (#1944) (#2209)
Copy cli/src/templates/ into cli/lucli/templates/codegen/ before packaging the wheels-module tarball so Templates.cfc::resolveTemplateDir() finds them at moduleRoot/templates/codegen/ in installed distributions. Without this step, every template-driven generator (model, controller, view, scaffold, helper, api-resource) either fails with "Template not found" or emits empty output in installed Wheels — the bug was masked in CI and monorepo development because resolveTemplateDir() falls back to cli/src/templates/ at its source path.
1 parent 2f1c989 commit 43d1411

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ jobs:
198198
- name: Build Wheels Module Tarball
199199
run: |
200200
mkdir -p artifacts/wheels/${{ env.WHEELS_VERSION }}
201+
# Bundle codegen templates into the module so Templates.cfc::resolveTemplateDir()
202+
# finds them at moduleRoot/templates/codegen/ in installed distributions.
203+
# Without this, every template-driven generator (model, controller, view,
204+
# scaffold, helper, api-resource) fails or emits empty output. See #1944.
205+
mkdir -p cli/lucli/templates/codegen
206+
cp -R cli/src/templates/. cli/lucli/templates/codegen/
201207
tar czf artifacts/wheels/${{ env.WHEELS_VERSION }}/wheels-module-${{ env.WHEELS_VERSION }}.tar.gz -C cli/lucli .
202208
cd cli/lucli && zip -r ../../artifacts/wheels/${{ env.WHEELS_VERSION }}/wheels-module-${{ env.WHEELS_VERSION }}.zip . && cd ../..
203209
cd artifacts/wheels/${{ env.WHEELS_VERSION }}

0 commit comments

Comments
 (0)