Skip to content

Commit fbd8e04

Browse files
committed
Restructure zip paths
1 parent 3cb22ac commit fbd8e04

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

bin/helpers/archiver.js

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ const archiveSpecs = (runSettings, filePath) => {
2727
var output = fs.createWriteStream(filePath);
2828

2929
var cypressJSONPath = runSettings.cypress + "/cypress.json"
30-
var basePath = runSettings.cypress + "/cypress/"
30+
var cypressEnvJSONPath = runSettings.cypress + "/cypress.env.json"
31+
var cypressFolderPath = runSettings.cypress + "/cypress"
32+
var basePath = runSettings.cypress
3133

3234
var archive = archiver('zip', {
3335
zlib: { level: 9 } // Sets the compression level.
@@ -57,29 +59,31 @@ const archiveSpecs = (runSettings, filePath) => {
5759

5860
fileNames = [];
5961

60-
getFiles(runSettings.specs, basePath, (files) => {
61-
fileNames = fileNames.concat(files);
62-
})
62+
// getFiles(runSettings.specs, basePath, (files) => {
63+
// fileNames = fileNames.concat(files);
64+
// })
6365

64-
getFiles(runSettings.supports, basePath, (files) => {
65-
archive.append(JSON.stringify({"support": files}), {name: "cypress_helpers.json"})
66-
fileNames = fileNames.concat(files);
67-
})
66+
// getFiles(runSettings.supports, basePath, (files) => {
67+
// archive.append(JSON.stringify({"support": files}), {name: "cypress_helpers.json"})
68+
// fileNames = fileNames.concat(files);
69+
// })
6870

69-
getFiles(runSettings.plugins, basePath, (files) => {
70-
fileNames = fileNames.concat(files);
71-
})
71+
// getFiles(runSettings.plugins, basePath, (files) => {
72+
// fileNames = fileNames.concat(files);
73+
// })
7274

73-
getFiles(runSettings.fixtures, basePath, (files) => {
74-
fileNames = fileNames.concat(files);
75-
})
75+
// getFiles(runSettings.fixtures, basePath, (files) => {
76+
// fileNames = fileNames.concat(files);
77+
// })
7678

77-
fileNames.forEach(function(file) {
78-
archive.file(basePath + file, { name: file });
79-
});
79+
// fileNames.forEach(function(file) {
80+
// archive.file(basePath + file, { name: file });
81+
// });
8082

8183
// Add cypress.json
8284
archive.file(cypressJSONPath, { name: "cypress.json" });
85+
archive.file(cypressEnvJSONPath, { name: "cypress.env.json" });
86+
archive.directory(cypressFolderPath, false);
8387

8488
archive.finalize();
8589
});

0 commit comments

Comments
 (0)