fix templating reg expression to match if .drone.yml contains --- characters (#3131)
* issue with regular expression for templates not picking up --- in drone.yml file
This commit is contained in:
parent
5426fb7b31
commit
e8fb0cfca6
2 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,7 @@ import (
|
|||
|
||||
var (
|
||||
// templateFileRE regex to verifying kind is template.
|
||||
templateFileRE = regexp.MustCompile("^kind:\\s+template+\\n")
|
||||
templateFileRE = regexp.MustCompilePOSIX("^kind:[[:space:]]+template[[:space:]]?+$")
|
||||
errTemplateNotFound = errors.New("template converter: template name given not found")
|
||||
errTemplateSyntaxErrors = errors.New("template converter: there is a problem with the yaml file provided")
|
||||
errTemplateExtensionInvalid = errors.New("template extension invalid. must be yaml, starlark or jsonnet")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
kind: template
|
||||
load: plugin.starlark
|
||||
data:
|
||||
|
|
Loading…
Reference in a new issue