1
0
mirror of synced 2025-12-23 11:54:18 -05:00
Files
docs/lib/enterprise-server-releases.js
Vanessa 4b8b75e337 GitHub Enterprise Server 3.4 release candidate (#24754)
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Vanessa <vgrl@github.com>
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
Co-authored-by: Lars Schneider <larsxschneider@github.com>
Co-authored-by: Jared Murrell <primetheus@github.com>
Co-authored-by: Jules Parker <19994093+jules-p@users.noreply.github.com>
Co-authored-by: Docubot <67483024+docubot@users.noreply.github.com>
Co-authored-by: Martin Lopes <martin389@github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Sarita Iyer <saritai@github.com>
Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: hubwriter <hubwriter@github.com>
Co-authored-by: Steve Guntrip <stevecat@github.com>
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
Co-authored-by: Lars Schneider <larsxschneider@github.com>
Co-authored-by: Jared Murrell <primetheus@github.com>
Co-authored-by: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com>
Co-authored-by: github-openapi-bot <github-openapi-bot@users.noreply.github.com>
2022-02-15 13:40:37 -05:00

105 lines
3.0 KiB
JavaScript

import versionSatisfiesRange from './version-satisfies-range.js'
import path from 'path'
import readFileAsync from './readfile-async.js'
export const dates = JSON.parse(
await readFileAsync(path.join(process.cwd(), './lib/enterprise-dates.json'))
)
// GHES Release Lifecycle Dates:
// enterprise-releases/docs/supported-versions.md#release-lifecycle-dates
// Some frontmatter may contain the upcoming GHES release number
export const next = '3.5'
export const nextNext = '3.6'
export const supported = ['3.4', '3.3', '3.2', '3.1', '3.0']
export const deprecated = [
'2.22',
'2.21',
'2.20',
'2.19',
'2.18',
'2.17',
'2.16',
'2.15',
'2.14',
'2.13',
'2.12',
'2.11',
'2.10',
'2.9',
'2.8',
'2.7',
'2.6',
'2.5',
'2.4',
'2.3',
'2.2',
'2.1',
'2.0',
'11.10.340',
]
export const legacyAssetVersions = ['3.0', '2.22', '2.21']
export const all = supported.concat(deprecated)
export const latest = supported[0]
export const oldestSupported = supported[supported.length - 1]
export const nextDeprecationDate = dates[oldestSupported].deprecationDate
export const isOldestReleaseDeprecated = new Date() > new Date(nextDeprecationDate)
export const deprecatedOnNewSite = deprecated.filter((version) =>
versionSatisfiesRange(version, '>=2.13')
)
export const firstVersionDeprecatedOnNewSite = '2.13'
// starting from 2.18, we updated the archival script to create a redirects.json top-level file in the archived repo
export const lastVersionWithoutArchivedRedirectsFile = '2.17'
// last version using paths like /enterprise/<release>/<user>/<product>/<category>/<article>
// instead of /enterprise-server@<release>/<product>/<category>/<article>
export const lastReleaseWithLegacyFormat = '2.18'
export const deprecatedReleasesWithLegacyFormat = deprecated.filter((version) =>
versionSatisfiesRange(version, '<=2.18')
)
export const deprecatedReleasesWithNewFormat = deprecated.filter((version) =>
versionSatisfiesRange(version, '>2.18')
)
export const deprecatedReleasesOnDeveloperSite = deprecated.filter((version) =>
versionSatisfiesRange(version, '<=2.16')
)
export const firstReleaseNote = '2.20'
export const firstRestoredAdminGuides = '2.21'
export const findReleaseNumberIndex = (releaseNum) => {
return all.findIndex((i) => i === releaseNum)
}
export const getNextReleaseNumber = (releaseNum) => {
return all[findReleaseNumberIndex(releaseNum) - 1]
}
export const getPreviousReleaseNumber = (releaseNum) => {
return all[findReleaseNumberIndex(releaseNum) + 1]
}
export default {
next,
nextNext,
supported,
deprecated,
legacyAssetVersions,
all,
latest,
oldestSupported,
nextDeprecationDate,
isOldestReleaseDeprecated,
deprecatedOnNewSite,
dates,
firstVersionDeprecatedOnNewSite,
lastVersionWithoutArchivedRedirectsFile,
lastReleaseWithLegacyFormat,
deprecatedReleasesWithLegacyFormat,
deprecatedReleasesWithNewFormat,
deprecatedReleasesOnDeveloperSite,
firstReleaseNote,
firstRestoredAdminGuides,
getNextReleaseNumber,
getPreviousReleaseNumber,
}