@@ -19,7 +19,7 @@ import renderContent from '../../lib/render-content/index.js'
1919import getApplicableVersions from '../../lib/get-applicable-versions.js'
2020import { execSync } from 'child_process'
2121import { 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'
2323import { getLiquidConditionals } from '../../script/helpers/get-liquid-conditionals.js'
2424import allowedVersionOperators from '../../lib/liquid-tags/ifversion-supported-operators.js'
2525const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) )
@@ -1102,10 +1102,12 @@ function validateIfversionConditionals(conds) {
11021102 `Found a "${ operator } " operator inside "${ cond } ", but "${ operator } " is not supported`
11031103 )
11041104 }
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 ) ) {
11091111 errors . push (
11101112 `Found ${ release } inside "${ cond } ", but ${ release } is not a supported GHES release`
11111113 )
0 commit comments