Skip to content

Commit a8cf3f8

Browse files
fixed bug with app-proxy client (#175)
1 parent 80d71bf commit a8cf3f8

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.0.162
1+
VERSION=v0.0.163
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")

cmd/commands/integrations.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -377,18 +377,16 @@ func getAppProxyClient(runtime *string, client *sdk.AppProxyAPI) func(*cobra.Com
377377
return err
378378
}
379379

380-
if *runtime != "" {
381-
return nil
382-
}
380+
if *runtime == "" {
381+
cur := cfConfig.GetCurrentContext()
383382

384-
cur := cfConfig.GetCurrentContext()
383+
if cur.DefaultRuntime == "" {
384+
return fmt.Errorf("default runtime not set, you must specify the runtime name with --runtime")
385+
}
385386

386-
if cur.DefaultRuntime == "" {
387-
return fmt.Errorf("missing name of runtime to use")
387+
*runtime = cur.DefaultRuntime
388388
}
389389

390-
*runtime = cur.DefaultRuntime
391-
392390
appProxy, err := cfConfig.NewClient().AppProxy(cmd.Context(), *runtime)
393391
if err != nil {
394392
return err

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cf version
2020
### Linux
2121
```bash
2222
# download and extract the binary
23-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.162/cf-linux-amd64.tar.gz | tar zx
23+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.163/cf-linux-amd64.tar.gz | tar zx
2424

2525
# move the binary to your $PATH
2626
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -32,7 +32,7 @@ cf version
3232
### Mac
3333
```bash
3434
# download and extract the binary
35-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.162/cf-darwin-amd64.tar.gz | tar zx
35+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.163/cf-darwin-amd64.tar.gz | tar zx
3636

3737
# move the binary to your $PATH
3838
mv ./cf-darwin-amd64 /usr/local/bin/cf

manifests/runtime.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: "{{ namespace }}"
66
spec:
77
defVersion: 1.0.0
8-
version: 0.0.162
8+
version: 0.0.163
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

0 commit comments

Comments
 (0)