@samitouri / QOS-React-2 / commits / 799ee65343

[DiffTrain] Tweak folder structure (#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: https://github.com/facebook/react/commit/bfc0eb6cd4d0a3cf9ae67f95b08d786356260cf6

lauren committed Nov 21, 2022 at 14:35 UTC 799ee65343fe79d5871531769c13abc2ba32492b
1 file changed +17 -10
.github/workflows/commit_artifacts.yml
+17 -10
@@ -39,7 +39,7 @@ jobs:
39
40 let artifactsUrl = null;
41 // 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!
43 let iter = 0;
44 spinloop: while (iter < 15) {
45 const res = await github.rest.repos.listCommitStatusesForRef({
@@ -73,7 +73,7 @@ jobs:
73 const data = await res.json();
74 for (const artifact of data) {
75 if (artifact.path === 'build.tgz') {
76 - console.log(`Downloading and unzipping ${artifact.url}...`);
76 + console.log(`Downloading and unzipping ${artifact.url}`);
77 await execHelper(
78 `curl -L ${artifact.url} | tar -xvz`
79 );
@@ -81,22 +81,25 @@ jobs:
81 }
82 - name: Move relevant files into compiled
83 run: |
84 - rm -rf ./compiled
85 -
84 mkdir -p ./compiled
85 mkdir -p ./compiled/facebook-www
86 mkdir -p ./compiled/babel-plugin-react-refresh
87
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
95 mv build/oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js \
96 ./compiled/facebook-www/eslint-plugin-react-hooks.js
97 +
98 + # Copy unstable_server-external-runtime.js into facebook-www
99 mv build/oss-stable/react-dom/unstable_server-external-runtime.js \
100 ./compiled/facebook-www/unstable_server-external-runtime.js
101 +
102 + # Copy react-refresh-babel.development.js into babel-plugin-react-refresh
103 mv build/oss-stable/react-refresh/cjs/react-refresh-babel.development.js \
104 ./compiled/babel-plugin-react-refresh/index.js
105
@@ -111,6 +114,10 @@ jobs:
114 runs-on: ubuntu-latest
115 steps:
116 - uses: actions/checkout@v3
117 + with:
118 + ref: builds/facebook-www
119 + - name: Ensure clean directory
120 + run: rm -rf compiled
121 - uses: actions/download-artifact@v3
122 with:
123 name: compiled