-
Notifications
You must be signed in to change notification settings - Fork 60.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from github/repo-sync
repo sync
- Loading branch information
Showing
98 changed files
with
1,537 additions
and
4,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"FEATURE_TEST_TRUE": true, | ||
"FEATURE_TEST_FALSE": false, | ||
"FEATURE_NEW_VERSIONS": true | ||
"FEATURE_TEST_FALSE": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,45 @@ | ||
const enterpriseServerReleases = require('./enterprise-server-releases') | ||
|
||
if (!process.env.FEATURE_NEW_VERSIONS) { | ||
module.exports = ['dotcom'].concat(enterpriseServerReleases.supported) | ||
} | ||
|
||
if (process.env.FEATURE_NEW_VERSIONS) { | ||
// version = "plan"@"release" | ||
// example: enterprise-server@2.21 | ||
// where "enterprise-server" is the plan and "2.21" is the release | ||
const versionDelimiter = '@' | ||
const latestNonNumberedRelease = 'latest' | ||
|
||
const plans = [ | ||
{ | ||
plan: 'free-pro-team', | ||
planTitle: 'Free, Pro, and Team', | ||
releases: [latestNonNumberedRelease], | ||
latestRelease: latestNonNumberedRelease, | ||
nonEnterpriseDefault: true // permanent way to refer to this plan if the name changes | ||
}, | ||
{ | ||
plan: 'enterprise-server', | ||
planTitle: 'Enterprise Server', | ||
releases: enterpriseServerReleases.supported, | ||
latestRelease: enterpriseServerReleases.latest, | ||
hasNumberedReleases: true | ||
// version = "plan"@"release" | ||
// example: enterprise-server@2.21 | ||
// where "enterprise-server" is the plan and "2.21" is the release | ||
const versionDelimiter = '@' | ||
const latestNonNumberedRelease = 'latest' | ||
|
||
const plans = [ | ||
{ | ||
plan: 'free-pro-team', | ||
planTitle: 'Free, Pro, and Team', | ||
releases: [latestNonNumberedRelease], | ||
latestRelease: latestNonNumberedRelease, | ||
nonEnterpriseDefault: true // permanent way to refer to this plan if the name changes | ||
}, | ||
{ | ||
plan: 'enterprise-server', | ||
planTitle: 'Enterprise Server', | ||
releases: enterpriseServerReleases.supported, | ||
latestRelease: enterpriseServerReleases.latest, | ||
hasNumberedReleases: true | ||
} | ||
] | ||
|
||
const allVersions = {} | ||
|
||
// combine the plans and releases to get allVersions object | ||
// e.g. free-pro-team@latest, enterprise-server@2.21, enterprise-server@2.20, etc. | ||
plans.forEach(planObj => { | ||
planObj.releases.forEach(release => { | ||
const version = `${planObj.plan}${versionDelimiter}${release}` | ||
|
||
const versionObj = { | ||
version, | ||
versionTitle: planObj.hasNumberedReleases ? `${planObj.planTitle} ${release}` : planObj.planTitle, | ||
latestVersion: `${planObj.plan}${versionDelimiter}${planObj.latestRelease}`, | ||
currentRelease: release | ||
} | ||
] | ||
|
||
const allVersions = {} | ||
|
||
// combine the plans and releases to get allVersions object | ||
// e.g. free-pro-team@latest, enterprise-server@2.21, enterprise-server@2.20, etc. | ||
plans.forEach(planObj => { | ||
planObj.releases.forEach(release => { | ||
const version = `${planObj.plan}${versionDelimiter}${release}` | ||
|
||
const versionObj = { | ||
version, | ||
versionTitle: planObj.hasNumberedReleases ? `${planObj.planTitle} ${release}` : planObj.planTitle, | ||
latestVersion: `${planObj.plan}${versionDelimiter}${planObj.latestRelease}`, | ||
currentRelease: release | ||
} | ||
|
||
allVersions[version] = Object.assign(versionObj, planObj) | ||
}) | ||
allVersions[version] = Object.assign(versionObj, planObj) | ||
}) | ||
}) | ||
|
||
module.exports = allVersions | ||
} | ||
module.exports = allVersions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.