pub struct SourceConfig {
pub enabled: Option<bool>,
pub format: Option<String>,
pub name_template: Option<String>,
pub prefix_template: Option<String>,
pub files: Vec<SourceFileEntry>,
}Fields§
§enabled: Option<bool>When true, generate a source code archive for the release.
format: Option<String>Archive format for the source tarball: tar.gz, tgz, tar, or zip (default: tar.gz).
name_template: Option<String>Filename template for the source archive (supports templates).
prefix_template: Option<String>Prefix prepended to all paths inside the archive (supports templates). Defaults to name_template value. Use this to set a different prefix than the archive name.
files: Vec<SourceFileEntry>Extra files to include in the source archive. Accepts strings (glob patterns) or objects with src/dst/info.
Implementations§
Source§impl SourceConfig
impl SourceConfig
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Whether source archive generation is enabled (default: false).
Sourcepub fn archive_format(&self) -> &str
pub fn archive_format(&self) -> &str
Archive format to use (default: “tar.gz”).
Sourcepub fn apply_prefix_template_default(&mut self)
pub fn apply_prefix_template_default(&mut self)
Apply defaults to prefix_template: when unset and name_template is
set, default prefix_template to the same string as name_template.
Q-src3: the doc has long claimed “Defaults to name_template value”,
but downstream consumers were reading the raw Option<String> and
substituting empty string. Filling the field at defaults-resolution
time honors the documented contract — stage code that already
renders the (now-Some) field needs no behavioral change.
GoReleaser internal/pipe/sourcearchive/source.go:49-57 defaults to
empty; this is anodize-additive (more ergonomic default), aligning
behavior with the long-standing doc.
Trait Implementations§
Source§impl Clone for SourceConfig
impl Clone for SourceConfig
Source§fn clone(&self) -> SourceConfig
fn clone(&self) -> SourceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SourceConfig
impl Debug for SourceConfig
Source§impl Default for SourceConfig
impl Default for SourceConfig
Source§fn default() -> SourceConfig
fn default() -> SourceConfig
Source§impl<'de> Deserialize<'de> for SourceConfigwhere
SourceConfig: Default,
impl<'de> Deserialize<'de> for SourceConfigwhere
SourceConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for SourceConfig
impl JsonSchema for SourceConfig
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more