Skip to content

Commit

Permalink
fix(ubuntu): Consider 22.04 unstable (#12528)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov committed Nov 6, 2021
1 parent cc9a638 commit 2b8fcd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/versioning/ubuntu/index.spec.ts
Expand Up @@ -121,6 +121,7 @@ describe('versioning/ubuntu/index', () => {
${'42.10'} | ${false}
${'42.11'} | ${false}
${'2020.04'} | ${false}
${'22.04'} | ${false}
`('isStable("$version") === $expected', ({ version, expected }) => {
const res = !!ubuntu.isStable(version);
expect(res).toBe(expected);
Expand Down
6 changes: 6 additions & 0 deletions lib/versioning/ubuntu/index.ts
Expand Up @@ -6,6 +6,9 @@ export const displayName = 'Ubuntu';
export const urls = ['https://changelogs.ubuntu.com/meta-release'];
export const supportsRanges = false;

// #12509
const temporarilyUnstable = ['22.04'];

// validation

function isValid(input: string): string | boolean | null {
Expand Down Expand Up @@ -34,6 +37,9 @@ function isStable(version: string): boolean {
if (!isValid(version)) {
return false;
}
if (temporarilyUnstable.includes(version)) {
return false;
}
return regEx(/^\d?[02468]\.04/).test(version);
}

Expand Down

0 comments on commit 2b8fcd4

Please sign in to comment.