PEP 440 support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import * as core from '@actions/core';
|
||||
export enum Type {
|
||||
Schedule = 'schedule',
|
||||
Semver = 'semver',
|
||||
Pep440 = 'pep440',
|
||||
Match = 'match',
|
||||
Edge = 'edge',
|
||||
Ref = 'ref',
|
||||
@@ -42,6 +43,7 @@ export class Tag {
|
||||
export const DefaultPriorities: Record<Type, string> = {
|
||||
[Type.Schedule]: '1000',
|
||||
[Type.Semver]: '900',
|
||||
[Type.Pep440]: '900',
|
||||
[Type.Match]: '800',
|
||||
[Type.Edge]: '700',
|
||||
[Type.Ref]: '600',
|
||||
@@ -124,7 +126,8 @@ export function Parse(s: string): Tag {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Type.Semver: {
|
||||
case Type.Semver:
|
||||
case Type.Pep440: {
|
||||
if (!tag.attrs.hasOwnProperty('pattern')) {
|
||||
throw new Error(`Missing pattern attribute for ${s}`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user