Skip to content

Commit b2ffe87

Browse files
authored
v3.0.0 CI Fixes (#131)
* Use --short command when getting kustomize version for test * Remove reference to deprecated exec plugin file name * Strip ksops.v from kustomize version
1 parent 2a7a3e8 commit b2ffe87

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.goreleaser.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ dockers:
8585
- go.sum
8686
- Makefile
8787
- scripts/
88-
- exec_plugin.go
8988
- ksops.go
9089
# include .git for version
9190
- .git/
@@ -123,7 +122,6 @@ dockers:
123122
- go.sum
124123
- Makefile
125124
- scripts/
126-
- exec_plugin.go
127125
- ksops.go
128126
# include .git for version
129127
- .git/

ksops_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func TestKSOPSPluginInstallation(t *testing.T) {
6060

6161
// run kustomize version to validate installation
6262
// and get kustomize version
63-
cmd := exec.Command("kustomize", "version")
63+
cmd := exec.Command("kustomize", "version", "--short")
6464
stdOut := bytes.Buffer{}
6565
stdErr := bytes.Buffer{}
6666
cmd.Stdout = &stdOut
@@ -80,7 +80,10 @@ func TestKSOPSPluginInstallation(t *testing.T) {
8080
// assume v4 (latest at time of writing)
8181
kustomizeVersion := "v4"
8282

83-
if strings.Contains(stdOut.String(), "v3") {
83+
// get std out and strip "ksops.v" string to simplify version matching
84+
versionOutput := strings.ReplaceAll(stdOut.String(), "ksops.v", "")
85+
86+
if strings.Contains(versionOutput, "v3") {
8487
t.Log("detected kustomize v3")
8588
kustomizeVersion = "v3"
8689
}

0 commit comments

Comments
 (0)