mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 11:22:30 +02:00
Revert using rsync
For some reason everything broke
This commit is contained in:
parent
ae872e7ee9
commit
3c6bc0c5de
1 changed files with 8 additions and 12 deletions
|
@ -110,18 +110,14 @@ shell.exec('git rm -rf .');
|
||||||
|
|
||||||
shell.cd('../..');
|
shell.cd('../..');
|
||||||
|
|
||||||
fromPath = path.join('build', PROJECT_PATH, '/');
|
shell.cp(
|
||||||
toPath = path.join('build', `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`);
|
'-R',
|
||||||
// In github.io case, project is deployed to root. Need to not recursively
|
// in github.io case, project is deployed to root. need to not recursively
|
||||||
// copy the deployment-branch to be.
|
// copy the deployment-branch to be.
|
||||||
excludePath = `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`;
|
// The !(...) represents the same thing as "everything but this"
|
||||||
// cannot use shell.cp because it doesn't support copying dotfiles and we
|
// Copies everything in /build except the directory after the !.
|
||||||
// need to copy directories like .circleci, for example
|
path.join('build', PROJECT_PATH, `!(${PROJECT_NAME}-${DEPLOYMENT_BRANCH})`),
|
||||||
// https://github.com/shelljs/shelljs/issues/79
|
path.join('build', `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`)
|
||||||
shell.exec(
|
|
||||||
`rsync -rtv --exclude=${excludePath} --exclude=.DS_Store ${fromPath} ${
|
|
||||||
toPath
|
|
||||||
}`
|
|
||||||
);
|
);
|
||||||
|
|
||||||
shell.cd(path.join('build', `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`));
|
shell.cd(path.join('build', `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue