@@ -19,7 +19,7 @@ import renderContent from '../../lib/render-content/index.js'
19
19
import getApplicableVersions from '../../lib/get-applicable-versions.js'
20
20
import { execSync } from 'child_process'
21
21
import { allVersions } from '../../lib/all-versions.js'
22
- import { supported , next } from '../../lib/enterprise-server-releases.js'
22
+ import { supported , next , deprecated } from '../../lib/enterprise-server-releases.js'
23
23
import { getLiquidConditionals } from '../../script/helpers/get-liquid-conditionals.js'
24
24
import allowedVersionOperators from '../../lib/liquid-tags/ifversion-supported-operators.js'
25
25
const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) )
@@ -1102,10 +1102,12 @@ function validateIfversionConditionals(conds) {
1102
1102
`Found a "${ operator } " operator inside "${ cond } ", but "${ operator } " is not supported`
1103
1103
)
1104
1104
}
1105
- // NOTE: The following will throw errors when we deprecate a version until we run the script to remove the
1106
- // deprecated versioning. If we deprecate a version before we have a working version of that script,
1107
- // we can comment out this part of the test temporarily and re-enable it once the script is ready.
1108
- if ( ! ( supported . includes ( release ) || release === next ) ) {
1105
+ // Check that the versions in conditionals are supported
1106
+ // versions of GHES or the first deprecated version. Allowing
1107
+ // the first deprecated version to exist in code ensures
1108
+ // allows us to deprecate the version before removing
1109
+ // the old liquid content.
1110
+ if ( ! ( supported . includes ( release ) || release === next || deprecated [ 0 ] === release ) ) {
1109
1111
errors . push (
1110
1112
`Found ${ release } inside "${ cond } ", but ${ release } is not a supported GHES release`
1111
1113
)
0 commit comments