mirror of
https://github.com/docker/metadata-action.git
synced 2026-01-22 14:39:02 +08:00
Allow custom value for semver and match type
This commit is contained in:
parent
b171e9c8ea
commit
e59258b94d
7 changed files with 179 additions and 20 deletions
|
|
@ -104,6 +104,9 @@ export function Parse(s: string): Tag {
|
|||
if (!tag.attrs.hasOwnProperty('pattern')) {
|
||||
throw new Error(`Missing pattern attribute for ${s}`);
|
||||
}
|
||||
if (!tag.attrs.hasOwnProperty('value')) {
|
||||
tag.attrs['value'] = '';
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Type.Match: {
|
||||
|
|
@ -116,6 +119,9 @@ export function Parse(s: string): Tag {
|
|||
if (isNaN(+tag.attrs['group'])) {
|
||||
throw new Error(`Invalid match group for ${s}`);
|
||||
}
|
||||
if (!tag.attrs.hasOwnProperty('value')) {
|
||||
tag.attrs['value'] = '';
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Type.Edge: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue