Skip to content

Commit

Permalink
Delete all but one build2 reference (facebook#22391)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
acdlite authored and zhengjitf committed Apr 15, 2022
1 parent 5bc6235 commit 4184286
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 28 deletions.
10 changes: 3 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand Down
3 changes: 0 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ scripts/flow/*/.flowconfig
_SpecRunner.html
__benchmarks__
build/
build2/
remote-repo/
coverage/
.module-cache
Expand Down Expand Up @@ -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
packages/react-devtools-scheduling-profiler/dist
1 change: 0 additions & 1 deletion scripts/flow/config/flowconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[ignore]
.*/scripts/bench/.*
.*/build/.*
.*/build2/.*
.*/fixtures/.*
.*/.tempUserDataDir/.*

Expand Down
6 changes: 0 additions & 6 deletions scripts/release/shared-commands/download-build-artifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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`
Expand Down
9 changes: 0 additions & 9 deletions scripts/rollup/build-all-release-channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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) {
Expand Down

0 comments on commit 4184286

Please sign in to comment.