mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 04:54:03 -08:00
feat(helm): add helmfile support
This commit is contained in:
parent
9058a9778e
commit
11606ead7a
|
@ -19,7 +19,7 @@ func (h *Helm) Enabled() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
inChart := false
|
inChart := false
|
||||||
files := []string{"Chart.yml", "Chart.yaml"}
|
files := []string{"Chart.yml", "Chart.yaml", "helmfile.yaml", "helmfile.yml"}
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
if _, err := h.env.HasParentFilePath(file); err == nil {
|
if _, err := h.env.HasParentFilePath(file); err == nil {
|
||||||
inChart = true
|
inChart = true
|
||||||
|
|
|
@ -57,6 +57,22 @@ func TestHelmSegment(t *testing.T) {
|
||||||
DisplayMode: "files",
|
DisplayMode: "files",
|
||||||
ChartFile: "Chart.yaml",
|
ChartFile: "Chart.yaml",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Case: "DisplayMode always inside chart. Chart file helmfile.yaml",
|
||||||
|
HelmExists: true,
|
||||||
|
ExpectedEnabled: true,
|
||||||
|
ExpectedString: "Helm 3.12.3",
|
||||||
|
DisplayMode: "files",
|
||||||
|
ChartFile: "helmfile.yaml",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Case: "DisplayMode always inside chart. Chart file helmfile.yml",
|
||||||
|
HelmExists: true,
|
||||||
|
ExpectedEnabled: true,
|
||||||
|
ExpectedString: "Helm 3.12.3",
|
||||||
|
DisplayMode: "files",
|
||||||
|
ChartFile: "helmfile.yml",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Case: "DisplayMode always outside chart",
|
Case: "DisplayMode always outside chart",
|
||||||
HelmExists: true,
|
HelmExists: true,
|
||||||
|
|
|
@ -25,7 +25,7 @@ import Config from '@site/src/components/Config.js';
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default | Description |
|
||||||
| -------------- | :------: | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| -------------- | :------: | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `display_mode` | `string` | `always` | <ul><li>`always`: the segment is always displayed</li><li>`files`: the segment is only displayed when a `Chart.yaml` (or `Chart.yml`) file is present </li></ul> |
|
| `display_mode` | `string` | `always` | <ul><li>`always`: the segment is always displayed</li><li>`files`: the segment is only displayed when a chart source file `Chart.yaml` (or `Chart.yml`) or helmfile `helmfile.yaml` (or `helmfile.yml`) is present </li></ul> |
|
||||||
|
|
||||||
## Template ([info][templates])
|
## Template ([info][templates])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue