Skip to content

Commit 42cd0c3

Browse files
committed
add version command and update version to match upstream + patch
1 parent 2d9ac8a commit 42cd0c3

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

cmd/helm-set-status/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ func SetStatus(helmOptions common.HelmOptions, kubeConfig common.KubeConfig) err
7575

7676
func main() {
7777
setStatusCmd := NewRootCmd(os.Stdout, os.Args[1:])
78+
setStatusCmd.AddCommand(newVersionCmd())
7879

7980
if err := setStatusCmd.Execute(); err != nil {
8081
os.Exit(1)

cmd/helm-set-status/version.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
6+
"github.com/spf13/cobra"
7+
)
8+
9+
// Version identifier populated via the CI/CD process.
10+
var version = "HEAD"
11+
12+
func newVersionCmd() *cobra.Command {
13+
return &cobra.Command{
14+
Use: "version",
15+
Short: "Show version of the helm diff plugin",
16+
Run: func(*cobra.Command, []string) {
17+
fmt.Println(version)
18+
},
19+
}
20+
}

plugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: "set-status"
3-
version: "0.1.0"
3+
version: "0.3.1"
44
usage: "helm set-status <RELEASE_NAME>"
55
description: |-
66
Manually set the status of a helm release

0 commit comments

Comments
 (0)