pub struct Config {
pub git: GitConfig,
pub commit: CommitConfig,
pub changelog: ChangelogConfig,
pub channels: ChannelsConfig,
pub vcs: VcsConfig,
pub packages: Vec<PackageConfig>,
}Expand description
Root configuration. Six top-level concerns:
git— tag prefix, floating tags, signingcommit— type→bump classificationchangelog— file, template, groupschannels— branch→release mappingvcs— provider-specific configpackages— version files, artifacts, hooks
Fields§
§git: GitConfig§commit: CommitConfig§changelog: ChangelogConfig§channels: ChannelsConfig§vcs: VcsConfig§packages: Vec<PackageConfig>Implementations§
Source§impl Config
impl Config
Sourcepub fn find_config(dir: &Path) -> Option<(PathBuf, bool)>
pub fn find_config(dir: &Path) -> Option<(PathBuf, bool)>
Find the first config file that exists in the given directory.
Sourcepub fn load(path: &Path) -> Result<Self, ReleaseError>
pub fn load(path: &Path) -> Result<Self, ReleaseError>
Load config from a YAML file. Falls back to defaults if the file doesn’t exist.
Sourcepub fn resolve_channel(
&self,
name: &str,
) -> Result<&ChannelConfig, ReleaseError>
pub fn resolve_channel( &self, name: &str, ) -> Result<&ChannelConfig, ReleaseError>
Resolve a named release channel, returning the channel config.
Sourcepub fn default_channel(&self) -> Result<&ChannelConfig, ReleaseError>
pub fn default_channel(&self) -> Result<&ChannelConfig, ReleaseError>
Resolve the default channel.
Sourcepub fn find_package(&self, path: &str) -> Result<&PackageConfig, ReleaseError>
pub fn find_package(&self, path: &str) -> Result<&PackageConfig, ReleaseError>
Find a package by path.
Sourcepub fn find_package_by_name(
&self,
name: &str,
) -> Result<&PackageConfig, ReleaseError>
pub fn find_package_by_name( &self, name: &str, ) -> Result<&PackageConfig, ReleaseError>
Find a package by name (last component of path).
Sourcepub fn tag_prefix_for(&self, pkg: &PackageConfig) -> String
pub fn tag_prefix_for(&self, pkg: &PackageConfig) -> String
Resolve effective tag prefix for a package.
Sourcepub fn changelog_for<'a>(
&'a self,
pkg: &'a PackageConfig,
) -> &'a ChangelogConfig
pub fn changelog_for<'a>( &'a self, pkg: &'a PackageConfig, ) -> &'a ChangelogConfig
Resolve effective changelog config for a package.
Sourcepub fn version_files_for(&self, pkg: &PackageConfig) -> Vec<String>
pub fn version_files_for(&self, pkg: &PackageConfig) -> Vec<String>
Resolve effective version files for a package, with auto-detection.
Sourcepub fn fixed_packages(&self) -> Vec<&PackageConfig>
pub fn fixed_packages(&self) -> Vec<&PackageConfig>
Get all non-independent packages (for fixed versioning).
Sourcepub fn independent_packages(&self) -> Vec<&PackageConfig>
pub fn independent_packages(&self) -> Vec<&PackageConfig>
Get all independent packages.
Sourcepub fn all_artifacts(&self) -> Vec<String>
pub fn all_artifacts(&self) -> Vec<String>
Collect all artifacts glob patterns from all packages.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more