From a1c652f5818914c4e8846028c24f211249e39d95 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Tue, 21 Sep 2021 15:48:21 -0400 Subject: [PATCH] Delete all but one `build2` reference This removes all the remaining references to the `build2` directory except for the CI job that stores the artifacts. We'll keep the `build2` artifact until downstream scripts are migrated to `build`. --- .circleci/config.yml | 10 +++------- .eslintignore | 3 --- .gitignore | 3 +-- scripts/flow/config/flowconfig | 1 - .../shared-commands/download-build-artifacts.js | 6 ------ scripts/rollup/build-all-release-channels.js | 9 --------- 6 files changed, 4 insertions(+), 28 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 81235be058a1f..1a604e225fac4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -103,9 +103,7 @@ jobs: - run: yarn build-combined - persist_to_workspace: root: . - # TODO: Migrate scripts to use `build` directory instead of `build2` paths: - - build2 - build get_base_build: @@ -121,7 +119,7 @@ jobs: git fetch origin main cd ./scripts/release && yarn && cd ../../ scripts/release/download-experimental-build.js --commit=$(git merge-base HEAD origin/main) - mv ./build2 ./base-build + mv ./build ./base-build - persist_to_workspace: root: . paths: @@ -136,12 +134,11 @@ jobs: at: . - run: yarn workspaces info | head -n -1 > workspace_info.txt - *restore_node_modules - - run: echo "<< pipeline.git.revision >>" >> build2/COMMIT_SHA - run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA # Compress build directory into a single tarball for easy download - - run: tar -zcvf ./build2.tgz ./build2 - # TODO: Migrate scripts to use `build` directory instead of `build2` - run: tar -zcvf ./build.tgz ./build + # TODO: Migrate scripts to use `build` directory instead of `build2` + - run: cp ./build.tgz ./build2.tgz - store_artifacts: path: ./build2.tgz - store_artifacts: @@ -154,7 +151,6 @@ jobs: - checkout - attach_workspace: at: . - - run: echo "<< pipeline.git.revision >>" >> build2/COMMIT_SHA - run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA - run: yarn workspaces info | head -n -1 > workspace_info.txt - *restore_node_modules diff --git a/.eslintignore b/.eslintignore index 71794edf67039..c55cc40866070 100644 --- a/.eslintignore +++ b/.eslintignore @@ -6,9 +6,6 @@ packages/react-art/npm/lib # Build products build/ -# TODO: Currently storing artifacts as `./build2` so that it doesn't conflict -# with old build job. Remove once we migrate rest of build/test pipeline. -build2/ coverage/ fixtures/ scripts/bench/benchmarks/**/*.js diff --git a/.gitignore b/.gitignore index fed2a08aa5d9e..8ba7bbecc2dce 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ scripts/flow/*/.flowconfig _SpecRunner.html __benchmarks__ build/ -build2/ remote-repo/ coverage/ .module-cache @@ -36,4 +35,4 @@ packages/react-devtools-extensions/shared/build packages/react-devtools-extensions/.tempUserDataDir packages/react-devtools-inline/dist packages/react-devtools-shell/dist -packages/react-devtools-scheduling-profiler/dist \ No newline at end of file +packages/react-devtools-scheduling-profiler/dist diff --git a/scripts/flow/config/flowconfig b/scripts/flow/config/flowconfig index 453c8406d061c..c0647c95468af 100644 --- a/scripts/flow/config/flowconfig +++ b/scripts/flow/config/flowconfig @@ -1,7 +1,6 @@ [ignore] .*/scripts/bench/.* .*/build/.* -.*/build2/.* .*/fixtures/.* .*/.tempUserDataDir/.* diff --git a/scripts/release/shared-commands/download-build-artifacts.js b/scripts/release/shared-commands/download-build-artifacts.js index c7ba16e417899..fba7465202739 100644 --- a/scripts/release/shared-commands/download-build-artifacts.js +++ b/scripts/release/shared-commands/download-build-artifacts.js @@ -4,7 +4,6 @@ const {exec} = require('child-process-promise'); const {existsSync} = require('fs'); -const fse = require('fs-extra'); const {join} = require('path'); const {getArtifactsList, logPromise} = require('../utils'); const theme = require('../theme'); @@ -31,11 +30,6 @@ const run = async ({build, cwd, releaseChannel}) => { } ); - // TODO: Currently storing a copy of the artifacts as `./build2`, because - // some scripts reference that directory. Remove once we migrate everything to - // reference `./build` instead. - fse.copySync('./build', './build2'); - // Copy to staging directory // TODO: Consider staging the release in a different directory from the CI // build artifacts: `./build/node_modules` -> `./staged-releases` diff --git a/scripts/rollup/build-all-release-channels.js b/scripts/rollup/build-all-release-channels.js index f2a5119502ce9..10a455d5dbbcc 100644 --- a/scripts/rollup/build-all-release-channels.js +++ b/scripts/rollup/build-all-release-channels.js @@ -56,11 +56,6 @@ if (process.env.CIRCLE_NODE_TOTAL) { buildForChannel('experimental', nodeTotal, nodeIndex); processExperimental('./build'); } - - // TODO: Currently storing a copy of the artifacts as `./build2`, because - // some scripts reference that directory. Remove once we migrate everything to - // reference `./build` instead. - fse.copySync('./build', './build2'); } else { // Running locally, no concurrency. Move each channel's build artifacts into // a temporary directory so that they don't conflict. @@ -87,10 +82,6 @@ if (process.env.CIRCLE_NODE_TOTAL) { // Now restore the combined directory back to its original name crossDeviceRenameSync(stableDir, './build'); - // TODO: Currently storing a copy of the artifacts as `./build2`, because - // some scripts reference that directory. Remove once we migrate everything to - // reference `./build` instead. - fse.copySync('./build', './build2'); } function buildForChannel(channel, nodeTotal, nodeIndex) {