Skip to content

Commit 0afbcf1

Browse files
committed
vault and terraform
ignore case when matching remove coverage
1 parent 6391f12 commit 0afbcf1

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

.gitignore

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
.idea
2-
download
3-
dist
4-
main
5-
toolbox*
1+
.idea
2+
download
3+
dist
4+
main
5+
toolbox*
6+
coverage.out

.toolbox.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,10 @@ tools:
1717
github: stedolan/jq
1818
yq:
1919
github: mikefarah/yq
20+
vault:
21+
github: hashicorp/vault
22+
downloadURL: https://releases.hashicorp.com/vault/{{ .VersionNum }}/vault_{{ .VersionNum }}_{{ .OS }}_{{ .Arch }}.zip
23+
terraform:
24+
github: hashicorp/terraform
25+
downloadURL: https://releases.hashicorp.com/terraform/{{ .VersionNum }}/terraform_{{ .VersionNum }}_{{ .OS }}_{{ .Arch }}.zip
2026
target: ./download

coverage.out

Lines changed: 0 additions & 1 deletion
This file was deleted.

main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,13 @@ func readVersions(target string) (map[string]string, error) {
323323
}
324324

325325
func matches(info string, name string) bool {
326-
if strings.Contains(name, info) {
326+
ln := strings.ToLower(name)
327+
if strings.Contains(ln, strings.ToLower(info)) {
327328
return true
328329
}
329330

330331
for _, a := range aliases[info] {
331-
if strings.Contains(name, a) {
332+
if strings.Contains(ln, a) {
332333
return true
333334
}
334335
}

0 commit comments

Comments
 (0)