GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore(build): Ensure experimental builds exists on windows (#20933) · react/react@ca15606

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • scripts/rollup
    • build-all-release-channels.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: scripts/rollup/build-all-release-channels.js
+21-1Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if (process.env.CIRCLE_NODE_TOTAL) {
6464
// will have already removed conflicting files.
6565
//
6666
// In CI, merging is handled automatically by CircleCI's workspace feature.
67-
spawnSync('rsync', ['-ar', experimentalDir + '/', stableDir + '/']);
67+
mergeDirsSync(experimentalDir + '/', stableDir + '/');
6868

6969
// Now restore the combined directory back to its original name
7070
// TODO: Currently storing artifacts as `./build2` so that it doesn't conflict
@@ -186,3 +186,23 @@ function updateTheReactVersionThatDevToolsReads(version) {
186186
`export default '${version}';\n`
187187
);
188188
}
189+
190+
/**
191+
* cross-platform alternative to `rsync -ar`
192+
* @param {string} source
193+
* @param {string} destination
194+
*/
195+
function mergeDirsSync(source, destination) {
196+
for (const sourceFileBaseName of fs.readdirSync(source)) {
197+
const sourceFileName = path.join(source, sourceFileBaseName);
198+
const targetFileName = path.join(destination, sourceFileBaseName);
199+
200+
const sourceFile = fs.statSync(sourceFileName);
201+
if (sourceFile.isDirectory()) {
202+
fse.ensureDirSync(targetFileName);
203+
mergeDirsSync(sourceFileName, targetFileName);
204+
} else {
205+
fs.copyFileSync(sourceFileName, targetFileName);
206+
}
207+
}
208+
}

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.