зеркало из https://github.com/github/docs.git
remove no-longer-needed feature flag
This commit is contained in:
Родитель
535dae5a8a
Коммит
b4690547a7
|
@ -10,7 +10,7 @@ const plans = [
|
|||
{ // free-pro-team is **not** a user-facing version and is stripped from URLs.
|
||||
// See lib/remove-fpt-from-path.js for details.
|
||||
plan: 'free-pro-team',
|
||||
planTitle: process.env.FEATURE_REMOVE_FPT ? 'GitHub.com' : 'Free, Pro, and Team',
|
||||
planTitle: 'Free, Pro, and Team',
|
||||
releases: [latestNonNumberedRelease],
|
||||
latestRelease: latestNonNumberedRelease,
|
||||
nonEnterpriseDefault: true, // permanent way to refer to this plan if the name changes
|
||||
|
|
|
@ -57,22 +57,13 @@ module.exports = function getOldPathsFromPath (currentPath, languageCode, curren
|
|||
// ------ BEGIN MODERN VERSION FORMAT REPLACEMENTS ------//
|
||||
if (currentlySupportedVersions.includes(currentVersion) || versionSatisfiesRange(currentVersion, `>${lastReleaseWithLegacyFormat}`)) {
|
||||
(new Set(oldPaths)).forEach(oldPath => {
|
||||
if (!process.env.FEATURE_REMOVE_FPT) {
|
||||
// create old path /github from new path /free-pro-team@latest/github
|
||||
oldPaths.add(oldPath
|
||||
.replace(`/${nonEnterpriseDefaultVersion}`, ''))
|
||||
// create old path /github from new path /free-pro-team@latest/github
|
||||
oldPaths.add(oldPath
|
||||
.replace(`/${nonEnterpriseDefaultVersion}`, ''))
|
||||
|
||||
// create old path /free-pro-team/github from new path /free-pro-team@latest/github
|
||||
oldPaths.add(oldPath
|
||||
.replace('@latest', ''))
|
||||
}
|
||||
|
||||
// TODO THIS ONE IS TRICKY BECAUSE OF VERSIONS TO ENABLE
|
||||
// if (process.env.FEATURE_REMOVE_FPT) {
|
||||
// // create old path /free-pro-team@latest/github from new path /github
|
||||
// oldPaths.add(oldPath
|
||||
// .replace(`/${nonEnterpriseDefaultVersion}`, ''))
|
||||
// }
|
||||
// create old path /free-pro-team/github from new path /free-pro-team@latest/github
|
||||
oldPaths.add(oldPath
|
||||
.replace('@latest', ''))
|
||||
|
||||
// create old path /enterprise/<version> from new path /enterprise-server@<version>
|
||||
oldPaths.add(oldPath
|
||||
|
|
|
@ -30,17 +30,7 @@ module.exports = async (req, res, next) => {
|
|||
}
|
||||
|
||||
// drop the version segment so pathParts now starts with /product
|
||||
if (!process.env.FEATURE_REMOVE_FPT) {
|
||||
pathParts.shift()
|
||||
}
|
||||
|
||||
if (process.env.FEATURE_REMOVE_FPT) {
|
||||
// if this is not FPT, drop the version segment so pathParts now starts with /product
|
||||
// if this is FPT, there is no version segment so pathParts already starts with /product
|
||||
if (req.context.currentVersion !== nonEnterpriseDefaultVersion) {
|
||||
pathParts.shift()
|
||||
}
|
||||
}
|
||||
pathParts.shift()
|
||||
|
||||
if (!pathParts[1]) return next()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче