Skip to content

Commit 799ee65

Browse files
authored
[DiffTrain] Tweak folder structure (facebook#25724)
Should hopefully be final tweaks! Sorry about all the noise. Test plan: temporarily ran the workflow on this branch, verified output in the builds/facebook-www branch is correct: facebook/react@bfc0eb6
1 parent 62e2b13 commit 799ee65

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

.github/workflows/commit_artifacts.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
4040
let artifactsUrl = null;
4141
// This is a temporary, dirty hack to avoid needing a GitHub auth token in the circleci
42-
// workflow to notify this GitHub action. Sorry.
42+
// workflow to notify this GitHub action. Sorry!
4343
let iter = 0;
4444
spinloop: while (iter < 15) {
4545
const res = await github.rest.repos.listCommitStatusesForRef({
@@ -73,30 +73,33 @@ jobs:
7373
const data = await res.json();
7474
for (const artifact of data) {
7575
if (artifact.path === 'build.tgz') {
76-
console.log(`Downloading and unzipping ${artifact.url}...`);
76+
console.log(`Downloading and unzipping ${artifact.url}`);
7777
await execHelper(
7878
`curl -L ${artifact.url} | tar -xvz`
7979
);
8080
}
8181
}
8282
- name: Move relevant files into compiled
8383
run: |
84-
rm -rf ./compiled
85-
8684
mkdir -p ./compiled
8785
mkdir -p ./compiled/facebook-www
8886
mkdir -p ./compiled/babel-plugin-react-refresh
8987
90-
mv build/facebook-www \
91-
./compiled/facebook-www
92-
mv build/WARNINGS \
93-
./compiled/facebook-www/WARNINGS
94-
mv build/COMMIT_SHA \
95-
./compiled/facebook-www/COMMIT_SHA
88+
# Copy the facebook-www folder into compiled
89+
mv build/facebook-www ./compiled
90+
91+
# Copy WARNINGS to facebook-www
92+
mv build/WARNINGS ./compiled/facebook-www/WARNINGS
93+
94+
# Copy eslint-plugin-react-hooks into facebook-www
9695
mv build/oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js \
9796
./compiled/facebook-www/eslint-plugin-react-hooks.js
97+
98+
# Copy unstable_server-external-runtime.js into facebook-www
9899
mv build/oss-stable/react-dom/unstable_server-external-runtime.js \
99100
./compiled/facebook-www/unstable_server-external-runtime.js
101+
102+
# Copy react-refresh-babel.development.js into babel-plugin-react-refresh
100103
mv build/oss-stable/react-refresh/cjs/react-refresh-babel.development.js \
101104
./compiled/babel-plugin-react-refresh/index.js
102105
@@ -111,6 +114,10 @@ jobs:
111114
runs-on: ubuntu-latest
112115
steps:
113116
- uses: actions/checkout@v3
117+
with:
118+
ref: builds/facebook-www
119+
- name: Ensure clean directory
120+
run: rm -rf compiled
114121
- uses: actions/download-artifact@v3
115122
with:
116123
name: compiled

0 commit comments

Comments
 (0)