Intention for git sourced scaffolds #209
Replies: 2 comments
-
Hey! For project scaffolds, it's intended that they are in their own repository. Here's an example This reason there is a 1-1 relationship between repository and scaffold is that it just makes things easier on my end to manage versions and resolution of scaffolds. I can assume that a repository has to have a scaffold configuration file in the root. Otherwise I'd need to recurse into the repository to find all projects. This also aligns with how most other project generation frameworks work so I think it's a reasonable choice. For the individual templates, those are intended to live in the repositories they are being used so there isn't really a consideration for sharing those across repositories. For example, I'm using the scaffold templates to generate some CRUD boiler-plate for the Go web template I've been working on https://github.com/levinologylabs/gottl/tree/main/.scaffold/domain They're so project specific I didn't think they'd need to be shared. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the explanation. I can see the value of the simplicity of the current feature. And templates being specific to a single repo also makes sense to me. My use case is in an environment where there are many repos that share similar patterns. One specific pattern is CI/CD workflows. We have many service repos that all have GitHub actions but they’re mostly boilerplate references to shared workflows. Rather than replicate the same scaffolds out to all the repos I want to centralize them so that updates can be made in one place. A GitHub submodule pulling from a shared scaffold template repository accomplishes this. So we’ll go that route. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to understand the intention of Git sourced project and template scaffolds. It seems like the source repo has to be a single scaffold with a
scaffold.yml
file in the root. Project scaffolds in subdirectories and template scaffolds don't seem to be supported. Is that accurate?I'm asking because it would be useful to have multiple projects and template scaffolds in a repo and be able to pull and use them.
Beta Was this translation helpful? Give feedback.
All reactions