Skip to content

Commit

Permalink
Remove gemfile and ruby code (github#19910)
Browse files Browse the repository at this point in the history
  • Loading branch information
heiskr authored Jun 16, 2021
1 parent 4c9b421 commit a0d1f7f
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 161 deletions.
5 changes: 0 additions & 5 deletions Gemfile

This file was deleted.

20 changes: 0 additions & 20 deletions Gemfile.lock

This file was deleted.

10 changes: 1 addition & 9 deletions script/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,6 @@ Given: /enterprise/admin/installation/upgrading-github-enterprise Returns: /ente
### [`graphql/utils/process-upcoming-changes.js`](graphql/utils/process-upcoming-changes.js)



---


### [`graphql/utils/remove-hidden-schema-members.rb`](graphql/utils/remove-hidden-schema-members.rb)



---


Expand Down Expand Up @@ -503,4 +495,4 @@ This script crawls the script directory, hooks on special comment markers in eac



---
---
22 changes: 3 additions & 19 deletions script/graphql/update-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ try {
process.exit(1)
}

// TODO this step is only required as long as we support GHE versions *OLDER THAN* 2.21
// as soon as 2.20 is deprecated on 2021-02-11, we can remove all graphql-ruby filtering
const removeHiddenMembersScript = path.join(__dirname, './utils/remove-hidden-schema-members.rb')

const versionsToBuild = Object.keys(allVersions)

const currentLanguage = 'en'
Expand Down Expand Up @@ -81,9 +77,8 @@ async function main () {
const schemaPath = getDataFilepath('schemas', graphqlVersion)
const previousSchemaString = fs.readFileSync(schemaPath, 'utf8')
const latestSchema = await getRemoteRawContent(schemaPath, graphqlVersion)
const safeForPublicSchema = removeHiddenMembers(schemaPath, latestSchema)
updateFile(schemaPath, safeForPublicSchema)
const schemaJsonPerVersion = await processSchemas(safeForPublicSchema, safeForPublicPreviews)
updateFile(schemaPath, latestSchema)
const schemaJsonPerVersion = await processSchemas(latestSchema, safeForPublicPreviews)
updateStaticFile(schemaJsonPerVersion, path.join(graphqlStaticDir, `schema-${graphqlVersion}.json`))

// Add some version specific data to the context
Expand All @@ -103,7 +98,7 @@ async function main () {
// The Changelog is only build for free-pro-team@latest
const changelogEntry = await createChangelogEntry(
previousSchemaString,
safeForPublicSchema,
latestSchema,
safeForPublicPreviews,
previousUpcomingChanges.upcoming_changes,
yaml.load(safeForPublicChanges).upcoming_changes
Expand Down Expand Up @@ -196,14 +191,3 @@ function updateStaticFile (json, filepath) {
const jsonString = JSON.stringify(json, null, 2)
updateFile(filepath, jsonString)
}

// run Ruby script to remove featureFlagged directives and other hidden members
function removeHiddenMembers (schemaPath, latestSchema) {
// have to write a temp file because the schema is too big to store in memory
const tempSchemaFilePath = `${schemaPath}-TEMP`
fs.writeFileSync(tempSchemaFilePath, latestSchema)
const remoteClean = execSync(`${removeHiddenMembersScript} ${tempSchemaFilePath}`).toString()
fs.unlinkSync(tempSchemaFilePath)

return remoteClean
}
108 changes: 0 additions & 108 deletions script/graphql/utils/remove-hidden-schema-members.rb

This file was deleted.

0 comments on commit a0d1f7f

Please sign in to comment.