Skip to content

Commit 2f64e91

Browse files
committed
fix ack-generate release
When running `./test/release/test-helm.sh` from the community repository, I was getting errors like this: ``` [jaypipes@thelio community]$ ./test/release/test-helm.sh s3 v0.0.2-37-g6c6957d-dirty testing Helm release for s3 for release version v0.0.2-37-g6c6957d-dirty. Building release artifacts for s3-v0.0.2-37-g6c6957d-dirty Error: open apis: no such file or directory ``` The above was due to the `ack-generate release` command calling the `getLatestAPIVersion()` function which in turn attempted to read the (old, pre-split-repo) `services/$SERVICE/apis/` directory. We don't actually need the latest API version when generating release artifacts for a controller, but the `pkg/generate.New()` function requires an APIVersion argument, so I'm just passing an empty string here, which solves the above problem and allows the helm test to complete.
1 parent b22e00a commit 2f64e91

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cmd/ack-generate/command/release.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,8 @@ func generateRelease(cmd *cobra.Command, args []string) error {
8080
return fmt.Errorf("service %s not found", svcAlias)
8181
}
8282
}
83-
latestAPIVersion, err = getLatestAPIVersion()
84-
if err != nil {
85-
return err
86-
}
8783
g, err := generate.New(
88-
sdkAPI, latestAPIVersion, optGeneratorConfigPath, ackgenerate.DefaultConfig,
84+
sdkAPI, "", optGeneratorConfigPath, ackgenerate.DefaultConfig,
8985
)
9086
if err != nil {
9187
return err

0 commit comments

Comments
 (0)