bake: allow dot in target name

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 8f61bfbbaa548eecce2f0b32c1e2ce37b8e87a0c)
pull/1012/head
CrazyMax 3 years ago
parent 106651877d
commit d6fa6da967
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

@ -28,7 +28,7 @@ var (
httpPrefix = regexp.MustCompile(`^https?://`)
gitURLPathWithFragmentSuffix = regexp.MustCompile(`\.git(?:#.+)?$`)
validTargetNameChars = `[a-zA-Z0-9_-]+`
validTargetNameChars = `[a-zA-Z0-9._-]+`
targetNamePattern = regexp.MustCompile(`^` + validTargetNameChars + `$`)
)

@ -1011,7 +1011,7 @@ func TestTargetName(t *testing.T) {
},
{
target: "a.b",
wantErr: true,
wantErr: false,
},
{
target: "_a",

@ -330,7 +330,7 @@ func TestServiceName(t *testing.T) {
},
{
svc: "a.b",
wantErr: true,
wantErr: false,
},
{
svc: "_a",

Loading…
Cancel
Save