Skip to content

Commit 92c7094

Browse files
CR-6116-gs-list-exit-codes (#91)
* bump and fix * different err log * tidy * naming
1 parent e7406ee commit 92c7094

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
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.90
1+
VERSION=v0.0.91
22
OUT_DIR=dist
33
YEAR?=$(shell date +"%Y")
44

cmd/commands/git-source.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ func NewGitSourceListCommand() *cobra.Command {
210210
}
211211

212212
func RunGitSourceList(ctx context.Context, runtimeName string) error {
213+
isRuntimeExists := checkExistingRuntimes(ctx, runtimeName)
214+
if isRuntimeExists == nil {
215+
return fmt.Errorf("there is no runtime by the name: %s", runtimeName)
216+
}
217+
213218
gitSources, err := cfConfig.NewClient().V2().GitSource().List(ctx, runtimeName)
214219
if err != nil {
215220
return fmt.Errorf("failed to get git-sources list. Err: %w", err)

cmd/commands/runtime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ func checkExistingRuntimes(ctx context.Context, runtime string) error {
366366
_, err := cfConfig.NewClient().V2().Runtime().Get(ctx, runtime)
367367
if err != nil {
368368
if strings.Contains(err.Error(), "does not exist") {
369-
return nil // runtime does exist
369+
return nil // runtime does not exist
370370
}
371371

372372
return fmt.Errorf("failed to get runtime: %w", 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.90/cf-linux-amd64.tar.gz | tar zx
23+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.91/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.90/cf-darwin-amd64.tar.gz | tar zx
35+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.91/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.90
8+
version: 0.0.91
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

0 commit comments

Comments
 (0)