Skip to content

Commit cf07c3d

Browse files
authored
Delete all but one build2 reference (#22391)
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`.
1 parent bb0d069 commit cf07c3d

File tree

6 files changed

+4
-28
lines changed

6 files changed

+4
-28
lines changed

.circleci/config.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ jobs:
103103
- run: yarn build-combined
104104
- persist_to_workspace:
105105
root: .
106-
# TODO: Migrate scripts to use `build` directory instead of `build2`
107106
paths:
108-
- build2
109107
- build
110108

111109
get_base_build:
@@ -121,7 +119,7 @@ jobs:
121119
git fetch origin main
122120
cd ./scripts/release && yarn && cd ../../
123121
scripts/release/download-experimental-build.js --commit=$(git merge-base HEAD origin/main)
124-
mv ./build2 ./base-build
122+
mv ./build ./base-build
125123
- persist_to_workspace:
126124
root: .
127125
paths:
@@ -136,12 +134,11 @@ jobs:
136134
at: .
137135
- run: yarn workspaces info | head -n -1 > workspace_info.txt
138136
- *restore_node_modules
139-
- run: echo "<< pipeline.git.revision >>" >> build2/COMMIT_SHA
140137
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
141138
# Compress build directory into a single tarball for easy download
142-
- run: tar -zcvf ./build2.tgz ./build2
143-
# TODO: Migrate scripts to use `build` directory instead of `build2`
144139
- run: tar -zcvf ./build.tgz ./build
140+
# TODO: Migrate scripts to use `build` directory instead of `build2`
141+
- run: cp ./build.tgz ./build2.tgz
145142
- store_artifacts:
146143
path: ./build2.tgz
147144
- store_artifacts:
@@ -154,7 +151,6 @@ jobs:
154151
- checkout
155152
- attach_workspace:
156153
at: .
157-
- run: echo "<< pipeline.git.revision >>" >> build2/COMMIT_SHA
158154
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
159155
- run: yarn workspaces info | head -n -1 > workspace_info.txt
160156
- *restore_node_modules

.eslintignore

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ packages/react-art/npm/lib
66

77
# Build products
88
build/
9-
# TODO: Currently storing artifacts as `./build2` so that it doesn't conflict
10-
# with old build job. Remove once we migrate rest of build/test pipeline.
11-
build2/
129
coverage/
1310
fixtures/
1411
scripts/bench/benchmarks/**/*.js

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ scripts/flow/*/.flowconfig
88
_SpecRunner.html
99
__benchmarks__
1010
build/
11-
build2/
1211
remote-repo/
1312
coverage/
1413
.module-cache
@@ -36,4 +35,4 @@ packages/react-devtools-extensions/shared/build
3635
packages/react-devtools-extensions/.tempUserDataDir
3736
packages/react-devtools-inline/dist
3837
packages/react-devtools-shell/dist
39-
packages/react-devtools-scheduling-profiler/dist
38+
packages/react-devtools-scheduling-profiler/dist

scripts/flow/config/flowconfig

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[ignore]
22
.*/scripts/bench/.*
33
.*/build/.*
4-
.*/build2/.*
54
.*/fixtures/.*
65
.*/.tempUserDataDir/.*
76

scripts/release/shared-commands/download-build-artifacts.js

-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
const {exec} = require('child-process-promise');
66
const {existsSync} = require('fs');
7-
const fse = require('fs-extra');
87
const {join} = require('path');
98
const {getArtifactsList, logPromise} = require('../utils');
109
const theme = require('../theme');
@@ -31,11 +30,6 @@ const run = async ({build, cwd, releaseChannel}) => {
3130
}
3231
);
3332

34-
// TODO: Currently storing a copy of the artifacts as `./build2`, because
35-
// some scripts reference that directory. Remove once we migrate everything to
36-
// reference `./build` instead.
37-
fse.copySync('./build', './build2');
38-
3933
// Copy to staging directory
4034
// TODO: Consider staging the release in a different directory from the CI
4135
// build artifacts: `./build/node_modules` -> `./staged-releases`

scripts/rollup/build-all-release-channels.js

-9
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ if (process.env.CIRCLE_NODE_TOTAL) {
5656
buildForChannel('experimental', nodeTotal, nodeIndex);
5757
processExperimental('./build');
5858
}
59-
60-
// TODO: Currently storing a copy of the artifacts as `./build2`, because
61-
// some scripts reference that directory. Remove once we migrate everything to
62-
// reference `./build` instead.
63-
fse.copySync('./build', './build2');
6459
} else {
6560
// Running locally, no concurrency. Move each channel's build artifacts into
6661
// a temporary directory so that they don't conflict.
@@ -87,10 +82,6 @@ if (process.env.CIRCLE_NODE_TOTAL) {
8782

8883
// Now restore the combined directory back to its original name
8984
crossDeviceRenameSync(stableDir, './build');
90-
// TODO: Currently storing a copy of the artifacts as `./build2`, because
91-
// some scripts reference that directory. Remove once we migrate everything to
92-
// reference `./build` instead.
93-
fse.copySync('./build', './build2');
9485
}
9586

9687
function buildForChannel(channel, nodeTotal, nodeIndex) {

0 commit comments

Comments
 (0)