Commit 0405379
committed
fix: replace stream copy with placeholder replacement for non-template files
## What
Non-template files copied during plugin generation now have __SERVICE_NAME__
and __ORGANIZATION__ placeholders replaced with actual values from the catalog
data. The stream-based copy was replaced with a read-replace-write approach
and the unused io import was removed.
## Why
The .goreleaser template in plugin-generator-templates uses goreleaser's own
template syntax (e.g. {{ title .Os }}) which conflicts with Go's text/template
parser. By switching non-template files to placeholder-based substitution,
files with their own template syntax can coexist without escaping gymnastics.
## Notes
- The companion change in plugin-generator-templates renames .goreleaser.tmpl
to .goreleaser.yaml with __SERVICE_NAME__ placeholder
- Any non-template file in the templates repo can now use __SERVICE_NAME__ and
__ORGANIZATION__ placeholders without being a .tmpl file
- The logger parameter on copyNonTemplateFile is now unused but retained for
signature consistency; could be cleaned up later
Signed-off-by: jmeridth <jmeridth@gmail.com>1 parent f8f5e6e commit 0405379
1 file changed
+14
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
167 | | - | |
| 166 | + | |
168 | 167 | | |
169 | | - | |
| 168 | + | |
170 | 169 | | |
171 | 170 | | |
172 | 171 | | |
| |||
282 | 281 | | |
283 | 282 | | |
284 | 283 | | |
285 | | - | |
| 284 | + | |
286 | 285 | | |
287 | 286 | | |
288 | 287 | | |
289 | 288 | | |
290 | 289 | | |
291 | | - | |
292 | | - | |
| 290 | + | |
293 | 291 | | |
294 | | - | |
| 292 | + | |
295 | 293 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | 294 | | |
311 | | - | |
312 | | - | |
313 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
314 | 298 | | |
315 | 299 | | |
| 300 | + | |
316 | 301 | | |
317 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
318 | 307 | | |
319 | 308 | | |
320 | 309 | | |
| |||
0 commit comments