mirror of
https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git
synced 2024-12-04 21:08:11 +00:00
Merge pull request '#7 fail gracefully if gitea url violates RFC 2606' (#8) from feature/#7-fail-gracefully into main
Reviewed-on: https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea/pulls/8 closes #7
This commit is contained in:
commit
989e7079a5
4 changed files with 6 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -3,7 +3,7 @@ GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
|
|||
|
||||
GOFMT ?= gofmt -s
|
||||
|
||||
VERSION = 0.6.1
|
||||
VERSION = 0.7.0
|
||||
|
||||
test: fmt-check
|
||||
go test -i $(TEST) || exit 1
|
||||
|
|
|
@ -17,7 +17,7 @@ terraform {
|
|||
required_providers {
|
||||
gitea = {
|
||||
source = "Lerentis/gitea"
|
||||
version = "0.6.1"
|
||||
version = "0.7.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ terraform {
|
|||
required_providers {
|
||||
gitea = {
|
||||
source = "terraform.local/lerentis/gitea"
|
||||
version = "0.6.1"
|
||||
version = "0.7.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,5 +118,8 @@ func validateAPIURLVersion(value interface{}, key string) (ws []string, es []err
|
|||
if strings.HasSuffix(v, "/api/v1") || strings.HasSuffix(v, "/api/v1/") {
|
||||
es = append(es, fmt.Errorf("terraform-gitea-provider base URL format is incorrect; Please leave out API Path %s", v))
|
||||
}
|
||||
if strings.Contains(v, "localhost") && strings.Contains(v, ".") {
|
||||
es = append(es, fmt.Errorf("terraform-gitea-provider base URL violates RFC 2606; Please do not define a subdomain for localhost!"))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue