Skip to content

Commit

Permalink
fix: change root dir back to how it was for mdapi deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed May 18, 2023
1 parent 98a5b70 commit ce8f598
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/metadataApiDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,6 @@ export class MetadataApiDeploy extends MetadataTransfer<
}

const zip = JSZip();
// metadata API doesn't want things at root, so add everything to a directory named, "zip"
zip.folder('zip');

const zipDirRecursive = (dir: string): void => {
const list = fs.readdirSync(dir);
Expand All @@ -454,7 +452,9 @@ export class MetadataApiDeploy extends MetadataTransfer<
if (stat.isDirectory()) {
zipDirRecursive(fullPath);
} else {
zip.file(relative(mdapiPath, fullPath), fs.createReadStream(fullPath));
// Add relative file paths to a root of "zip" for MDAPI.
const relPath = join('zip', relative(mdapiPath, fullPath));
zip.file(relPath, fs.createReadStream(fullPath));
}
}
};
Expand Down

2 comments on commit ce8f598

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: ce8f598 Previous: 98a5b70 Ratio
eda-componentSetCreate-linux 259 ms 274 ms 0.95
eda-sourceToMdapi-linux 7699 ms 5863 ms 1.31
eda-sourceToZip-linux 6451 ms 5965 ms 1.08
eda-mdapiToSource-linux 5024 ms 4748 ms 1.06
lotsOfClasses-componentSetCreate-linux 530 ms 547 ms 0.97
lotsOfClasses-sourceToMdapi-linux 10011 ms 10231 ms 0.98
lotsOfClasses-sourceToZip-linux 9295 ms 9702 ms 0.96
lotsOfClasses-mdapiToSource-linux 5375 ms 5591 ms 0.96
lotsOfClassesOneDir-componentSetCreate-linux 895 ms 925 ms 0.97
lotsOfClassesOneDir-sourceToMdapi-linux 15039 ms 15082 ms 1.00
lotsOfClassesOneDir-sourceToZip-linux 15268 ms 15120 ms 1.01
lotsOfClassesOneDir-mdapiToSource-linux 9732 ms 9624 ms 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: ce8f598 Previous: 98a5b70 Ratio
eda-componentSetCreate-win32 429 ms 430 ms 1.00
eda-sourceToMdapi-win32 8046 ms 9530 ms 0.84
eda-sourceToZip-win32 6419 ms 7837 ms 0.82
eda-mdapiToSource-win32 7887 ms 9226 ms 0.85
lotsOfClasses-componentSetCreate-win32 839 ms 1059 ms 0.79
lotsOfClasses-sourceToMdapi-win32 11440 ms 13639 ms 0.84
lotsOfClasses-sourceToZip-win32 9140 ms 10342 ms 0.88
lotsOfClasses-mdapiToSource-win32 9141 ms 10743 ms 0.85
lotsOfClassesOneDir-componentSetCreate-win32 1517 ms 1764 ms 0.86
lotsOfClassesOneDir-sourceToMdapi-win32 19490 ms 21929 ms 0.89
lotsOfClassesOneDir-sourceToZip-win32 15892 ms 17534 ms 0.91
lotsOfClassesOneDir-mdapiToSource-win32 16649 ms 18722 ms 0.89

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.