anodizer_core/config/templatefiles.rs
1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4// ---------------------------------------------------------------------------
5// TemplateFileConfig
6// ---------------------------------------------------------------------------
7
8/// Configuration for a template file that is rendered through the template
9/// engine and placed in the dist directory as a release artifact.
10///
11/// GoReleaser Pro feature: all rendered template files are uploaded to the
12/// release by default. Both `src` and `dst` paths support template rendering.
13#[derive(Debug, Clone, Serialize, Deserialize, Default, JsonSchema)]
14#[serde(default)]
15pub struct TemplateFileConfig {
16 /// Identifier for this template file entry (default: "default").
17 pub id: Option<String>,
18 /// Source template file path. The file contents are rendered through the template engine.
19 /// Templates: allowed (in path itself).
20 pub src: String,
21 /// Destination filename, prefixed with the dist directory.
22 /// Templates: allowed.
23 pub dst: String,
24 /// File permissions in octal notation as a string, e.g. `"0755"` (default: `"0655"`).
25 /// Parsed at runtime via `parse_octal_mode()` to avoid YAML interpreting as decimal.
26 pub mode: Option<String>,
27}