From fa84be7019d4784724e577f203368caa28d00dc6 Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Tue, 7 Mar 2023 11:24:50 -0800 Subject: [PATCH] consolidate temp directory when generating openapi data (#35331) --- .github/workflows/openapi-decorate.yml | 1 - .gitignore | 5 +++++ src/rest/scripts/update-files.js | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/openapi-decorate.yml b/.github/workflows/openapi-decorate.yml index 4118807fed..d0e3d9a29f 100644 --- a/.github/workflows/openapi-decorate.yml +++ b/.github/workflows/openapi-decorate.yml @@ -63,7 +63,6 @@ jobs: git status echo "Deleting the cloned github/rest-api-description repo..." rm -rf rest-api-description - rm -rf openApiTemp - name: Create pull request env: diff --git a/.gitignore b/.gitignore index 3c1f8a6727..171f56a24d 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,9 @@ user-code/ # Logs from scripts script/logs/ external-link-checker-db.json + +# Automated content source +rest-api-description + .installed.package-lock.json + diff --git a/src/rest/scripts/update-files.js b/src/rest/scripts/update-files.js index 5444a2b7f0..46f28798c2 100755 --- a/src/rest/scripts/update-files.js +++ b/src/rest/scripts/update-files.js @@ -24,10 +24,10 @@ import { syncGitHubAppsData } from '../../github-apps/scripts/sync.js' import { syncRestRedirects } from './utils/get-redirects.js' const __dirname = path.dirname(fileURLToPath(import.meta.url)) -const TEMP_OPENAPI_DIR = path.join(__dirname, '../../../openApiTemp') +const TEMP_OPENAPI_DIR = path.join(__dirname, '../../../rest-api-description/openApiTemp') const TEMP_BUNDLED_OPENAPI_DIR = path.join(TEMP_OPENAPI_DIR, 'bundled') const GITHUB_REP_DIR = '../github' -const REST_DESCRIPTION_DIR = path.join('rest-api-description/descriptions-next') +const REST_DESCRIPTION_DIR = 'rest-api-description/descriptions-next' const VERSION_NAMES = JSON.parse(await readFile('src/rest/data/meta.json', 'utf8')).versionMapping program