Skip to main content

helm_rs/command/
version.rs

1use crate::backend::Command;
2
3/// `helm version`: the version of the Helm binary.
4#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
5pub struct Version;
6
7/// The build information of Helm (`internal/version.BuildInfo`, v4.3.0).
8#[derive(Debug, Clone, PartialEq, Eq)]
9pub struct HelmVersion {
10    /// The semantic version (the leading `v` is dropped).
11    pub version: semver::Version,
12    /// The git commit Helm was built from.
13    pub git_commit: String,
14    /// `clean` or `dirty`; empty when the build did not record it.
15    pub git_tree_state: String,
16    /// The Go toolchain version.
17    pub go_version: String,
18}
19
20impl Command for Version {
21    type Output = HelmVersion;
22}