PEP 440 support

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax committed 2021-07-06 13:56:55 +02:00
1 parent 8a0bc9fddd
commit a1770d2eba
14 files changed
+10946 -6

No files matched your search

+4 -1
View File
@@ -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}`);
}