Skip to content

Commit

Permalink
[DiffTrain] Tweak folder structure (#25724)
Browse files Browse the repository at this point in the history
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:
bfc0eb6
  • Loading branch information
poteto committed Nov 21, 2022
1 parent 62e2b13 commit 799ee65
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/commit_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
let artifactsUrl = null;
// This is a temporary, dirty hack to avoid needing a GitHub auth token in the circleci
// workflow to notify this GitHub action. Sorry.
// workflow to notify this GitHub action. Sorry!
let iter = 0;
spinloop: while (iter < 15) {
const res = await github.rest.repos.listCommitStatusesForRef({
Expand Down Expand Up @@ -73,30 +73,33 @@ jobs:
const data = await res.json();
for (const artifact of data) {
if (artifact.path === 'build.tgz') {
console.log(`Downloading and unzipping ${artifact.url}...`);
console.log(`Downloading and unzipping ${artifact.url}`);
await execHelper(
`curl -L ${artifact.url} | tar -xvz`
);
}
}
- name: Move relevant files into compiled
run: |
rm -rf ./compiled
mkdir -p ./compiled
mkdir -p ./compiled/facebook-www
mkdir -p ./compiled/babel-plugin-react-refresh
mv build/facebook-www \
./compiled/facebook-www
mv build/WARNINGS \
./compiled/facebook-www/WARNINGS
mv build/COMMIT_SHA \
./compiled/facebook-www/COMMIT_SHA
# Copy the facebook-www folder into compiled
mv build/facebook-www ./compiled
# Copy WARNINGS to facebook-www
mv build/WARNINGS ./compiled/facebook-www/WARNINGS
# Copy eslint-plugin-react-hooks into facebook-www
mv build/oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js \
./compiled/facebook-www/eslint-plugin-react-hooks.js
# Copy unstable_server-external-runtime.js into facebook-www
mv build/oss-stable/react-dom/unstable_server-external-runtime.js \
./compiled/facebook-www/unstable_server-external-runtime.js
# Copy react-refresh-babel.development.js into babel-plugin-react-refresh
mv build/oss-stable/react-refresh/cjs/react-refresh-babel.development.js \
./compiled/babel-plugin-react-refresh/index.js
Expand All @@ -111,6 +114,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: builds/facebook-www
- name: Ensure clean directory
run: rm -rf compiled
- uses: actions/download-artifact@v3
with:
name: compiled
Expand Down

0 comments on commit 799ee65

Please sign in to comment.