mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Enable to release update for previous major
This commit is contained in:
parent
6a267b716c
commit
1b498f1789
4 changed files with 60 additions and 21 deletions
|
|
@ -12,13 +12,14 @@ export function getLatestSemVersionedTagFactory(params: { octokit: Octokit; }) {
|
|||
owner: string;
|
||||
repo: string;
|
||||
beta: "ONLY LOOK FOR BETA" | "IGNORE BETA" | "BETA OR REGULAR RELEASE";
|
||||
major: number | undefined;
|
||||
}
|
||||
): Promise<{
|
||||
tag: string;
|
||||
version: NpmModuleVersion;
|
||||
} | undefined> {
|
||||
|
||||
const { owner, repo, beta } = params;
|
||||
const { owner, repo, beta, major } = params;
|
||||
|
||||
const semVersionedTags: { tag: string; version: NpmModuleVersion; }[] = [];
|
||||
|
||||
|
|
@ -32,6 +33,10 @@ export function getLatestSemVersionedTagFactory(params: { octokit: Octokit; }) {
|
|||
|
||||
version = NpmModuleVersion.parse(tag.replace(/^[vV]?/, ""));
|
||||
|
||||
if (major !== undefined && version.major !== major) {
|
||||
continue;
|
||||
}
|
||||
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue