Skip to content

Commit

Permalink
Revert "feat(deploy): copy local git config to tmp repo (facebook#7702)"
Browse files Browse the repository at this point in the history
This reverts commit ee376d1.

All git config fields can be set via the GIT_CONFIG_KEY_<n> and GIT_CONFIG_VALUE_<n> env vars.

Ref: https://git-scm.com/docs/git-config#Documentation/git-config.txt-GITCONFIGCOUNT

Alternatively, you can also use the conditional includes feature of git config.

Ref: https://git-scm.com/docs/git-config#_conditional_includes

fixes facebook#7744
  • Loading branch information
ghostsquad committed Jul 9, 2022
1 parent e62d5e3 commit a6f7f5f
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions packages/docusaurus/src/commands/deploy.ts
Expand Up @@ -183,9 +183,6 @@ You can also set the deploymentBranch property in docusaurus.config.js .`);
// Save the commit hash that triggers publish-gh-pages before checking
// out to deployment branch.
const currentCommit = shellExecLog('git rev-parse HEAD').stdout.trim();
const currentGitRootDir = shellExecLog(
'git rev-parse --show-toplevel',
).stdout.trim();

const runDeploy = async (outputDirectory: string) => {
const fromPath = outputDirectory;
Expand Down Expand Up @@ -216,16 +213,6 @@ You can also set the deploymentBranch property in docusaurus.config.js .`);
logger.error`Copying build assets from path=${fromPath} to path=${toPath} failed.`;
throw err;
}

const gitConfigFromPath = path.join(currentGitRootDir, `.git`, `config`);
const gitConfigToPath = path.join(toPath, `.git`, `config`);
try {
await fs.copy(gitConfigFromPath, gitConfigToPath);
} catch (err) {
logger.error`Copying git config from path=${gitConfigFromPath} to path=${gitConfigToPath} failed.`;
throw err;
}

shellExecLog('git add --all');

const commitMessage =
Expand Down

0 comments on commit a6f7f5f

Please sign in to comment.