update GraphQL workflow post-translations removal (#33875)
This commit is contained in:
@@ -10,7 +10,6 @@ import processPreviews from './utils/process-previews.js'
|
|||||||
import processUpcomingChanges from './utils/process-upcoming-changes.js'
|
import processUpcomingChanges from './utils/process-upcoming-changes.js'
|
||||||
import processSchemas from './utils/process-schemas.js'
|
import processSchemas from './utils/process-schemas.js'
|
||||||
import { prependDatedEntry, createChangelogEntry } from './build-changelog.js'
|
import { prependDatedEntry, createChangelogEntry } from './build-changelog.js'
|
||||||
import loadData from '../../lib/site-data.js'
|
|
||||||
|
|
||||||
const graphqlDataDir = path.join(process.cwd(), 'data/graphql')
|
const graphqlDataDir = path.join(process.cwd(), 'data/graphql')
|
||||||
const graphqlStaticDir = path.join(process.cwd(), 'lib/graphql/static')
|
const graphqlStaticDir = path.join(process.cwd(), 'lib/graphql/static')
|
||||||
@@ -25,22 +24,12 @@ if (!process.env.GITHUB_TOKEN) {
|
|||||||
|
|
||||||
const versionsToBuild = Object.keys(allVersions)
|
const versionsToBuild = Object.keys(allVersions)
|
||||||
|
|
||||||
const currentLanguage = 'en'
|
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const previewsJson = {}
|
const previewsJson = {}
|
||||||
const upcomingChangesJson = {}
|
const upcomingChangesJson = {}
|
||||||
|
|
||||||
const siteData = loadData()
|
|
||||||
|
|
||||||
// create a bare minimum context for rendering the graphql-object.html layout
|
|
||||||
const context = {
|
|
||||||
currentLanguage,
|
|
||||||
site: siteData[currentLanguage].site,
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const version of versionsToBuild) {
|
for (const version of versionsToBuild) {
|
||||||
// Get the relevant GraphQL name for the current version
|
// Get the relevant GraphQL name for the current version
|
||||||
// For example, free-pro-team@latest corresponds to dotcom,
|
// For example, free-pro-team@latest corresponds to dotcom,
|
||||||
@@ -73,10 +62,6 @@ async function main() {
|
|||||||
path.join(graphqlStaticDir, `schema-${graphqlVersion}.json`)
|
path.join(graphqlStaticDir, `schema-${graphqlVersion}.json`)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Add some version specific data to the context
|
|
||||||
context.graphql = { schemaForCurrentVersion: schemaJsonPerVersion }
|
|
||||||
context.currentVersion = version
|
|
||||||
|
|
||||||
// 4. UPDATE CHANGELOG
|
// 4. UPDATE CHANGELOG
|
||||||
if (allVersions[version].nonEnterpriseDefault) {
|
if (allVersions[version].nonEnterpriseDefault) {
|
||||||
// The Changelog is only build for free-pro-team@latest
|
// The Changelog is only build for free-pro-team@latest
|
||||||
|
|||||||
Reference in New Issue
Block a user