Skip to content

Commit cc9de7b

Browse files
[CLI]:Fix ingress validation (#436)
* Fix ingress validation * Up version * Bump
1 parent fd70335 commit cc9de7b

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
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.387
1+
VERSION=v0.0.388
22

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

cmd/commands/common.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,7 @@ func IsValidName(s string) (bool, error) {
8484
}
8585

8686
func isValidIngressHost(ingressHost string) (bool, error) {
87-
pattern := `^https://`
88-
if store.Get().InsecureIngressHost {
89-
pattern = `^(http|https)://`
90-
}
91-
return regexp.MatchString(pattern, ingressHost)
87+
return regexp.MatchString(`^(http|https)://`, ingressHost)
9288
}
9389

9490
func askUserIfToInstallDemoResources(cmd *cobra.Command, sampleInstall *bool) error {
@@ -496,11 +492,12 @@ func setIngressHost(ctx context.Context, opts *RuntimeInstallOptions) error {
496492
if err != nil {
497493
return err
498494
}
499-
_, err := http.Get(opts.IngressHost)
495+
response, err := http.Get(opts.IngressHost)
500496
if err != nil {
501497
opts.IngressHost = ""
502498
return err
503499
}
500+
response.Body.Close()
504501
}
505502

506503
if opts.IngressHost == "" {

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cf version
2323

2424
```bash
2525
# download and extract the binary
26-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.387/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.388/cf-linux-amd64.tar.gz | tar zx
2727

2828
# move the binary to your $PATH
2929
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
3636

3737
```bash
3838
# download and extract the binary
39-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.387/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.388/cf-darwin-amd64.tar.gz | tar zx
4040

4141
# move the binary to your $PATH
4242
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.1
8-
version: 0.0.387
8+
version: 0.0.388
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

0 commit comments

Comments
 (0)