forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
enterprise-server-releases.js
59 lines (56 loc) · 1.45 KB
/
enterprise-server-releases.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const versionSatisfiesRange = require('./version-satisfies-range')
// GHES Release Lifecycle Dates:
// https://github.com/github/enterprise-releases/blob/master/docs/supported-versions.md#release-lifecycle-dates
const dates = require('../lib/enterprise-dates.json')
const supported = [
'2.22',
'2.21',
'2.20',
'2.19'
]
const deprecated = [
'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'
]
const all = supported.concat(deprecated)
const latest = supported[0]
const oldestSupported = supported[supported.length - 1]
const nextDeprecationDate = dates[oldestSupported].deprecationDate
const deprecatedOnNewSite = deprecated.filter(version => versionSatisfiesRange(version, '>=2.13'))
const firstVersionDeprecatedOnNewSite = '2.13'
// starting from 2.18, we updated the archival script to create stubbed HTML redirect files
const lastVersionWithoutStubbedRedirectFiles = '2.17'
// last version using paths like /enterprise/<verison>/<user>/<product>/<category>/<article>
// instead of /enterprise-server@<release>/<product>/<category>/<article>
const lastReleaseWithLegacyFormat = '2.18'
module.exports = {
supported,
deprecated,
all,
latest,
oldestSupported,
nextDeprecationDate,
deprecatedOnNewSite,
dates,
firstVersionDeprecatedOnNewSite,
lastVersionWithoutStubbedRedirectFiles,
lastReleaseWithLegacyFormat
}