Skip to content

Commit 0c81d34

Browse files
committed
Write artifacts to build instead of build2
Now that all the CI jobs have been migrated to the new build script, we can start renaming the `build2` directory to `build`. Since there are lots of scripts that reference `build2`, including downstream scripts that live outside this repo, I'm going to keep the `build2` directory around as a copy of `build`. Then once all the references are updated, I will delete the copy.
1 parent baff3f2 commit 0c81d34

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.circleci/config.yml

+6
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ jobs:
158158
- run: yarn build-combined
159159
- persist_to_workspace:
160160
root: .
161+
# TODO: Migrate scripts to use `build` directory instead of `build2`
161162
paths:
162163
- build2
164+
- build
163165

164166
get_base_build:
165167
docker: *docker
@@ -192,8 +194,12 @@ jobs:
192194
- run: echo "<< pipeline.git.revision >>" >> build2/COMMIT_SHA
193195
# Compress build directory into a single tarball for easy download
194196
- run: tar -zcvf ./build2.tgz ./build2
197+
# TODO: Migrate scripts to use `build` directory instead of `build2`
198+
- run: tar -zcvf ./build.tgz ./build
195199
- store_artifacts:
196200
path: ./build2.tgz
201+
- store_artifacts:
202+
path: ./build.tgz
197203

198204
sizebot:
199205
docker: *docker

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

+9-6
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ if (process.env.CIRCLE_NODE_TOTAL) {
5757
processExperimental('./build');
5858
}
5959

60-
// TODO: Currently storing artifacts as `./build2` so that it doesn't conflict
61-
// with old build job. Remove once we migrate rest of build/test pipeline.
62-
fs.renameSync('./build', './build2');
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');
6364
} else {
6465
// Running locally, no concurrency. Move each channel's build artifacts into
6566
// a temporary directory so that they don't conflict.
@@ -85,9 +86,11 @@ if (process.env.CIRCLE_NODE_TOTAL) {
8586
mergeDirsSync(experimentalDir + '/', stableDir + '/');
8687

8788
// Now restore the combined directory back to its original name
88-
// TODO: Currently storing artifacts as `./build2` so that it doesn't conflict
89-
// with old build job. Remove once we migrate rest of build/test pipeline.
90-
crossDeviceRenameSync(stableDir, './build2');
89+
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');
9194
}
9295

9396
function buildForChannel(channel, nodeTotal, nodeIndex) {

0 commit comments

Comments
 (0)