Skip to content

Commit 767a4fa

Browse files
committed
reverting update config command, moving npm_dependencies to run settings
1 parent 8b5e5d4 commit 767a4fa

File tree

5 files changed

+7
-71
lines changed

5 files changed

+7
-71
lines changed

bin/commands/runs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function runCypress(args) {
3131
capabilityHelper.validate(bsConfig).then(function (validated) {
3232
logger.log(validated);
3333
// Archive the spec files
34-
archiver.archive(bsConfig, config.fileName).then(function (data) {
34+
archiver.archive(bsConfig.run_settings, config.fileName).then(function (data) {
3535
// Uploaded zip file
3636
zipUploader.zipUpload(bsConfig, config.fileName).then(function (zip) {
3737
// Create build

bin/commands/updateConfig.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

bin/helpers/archiver.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ const fs = require('fs'),
33
archiver = require('archiver'),
44
logger = require("./logger");
55

6-
const archiveSpecs = (bsConfig, filePath) => {
6+
const archiveSpecs = (runSettings, filePath) => {
77
return new Promise(function (resolve, reject) {
88
var output = fs.createWriteStream(filePath);
99

10-
var cypressFolderPath = bsConfig.run_settings.cypress_proj_dir
10+
var cypressFolderPath = runSettings.cypress_proj_dir;
1111

1212
var archive = archiver('zip', {
1313
zlib: { level: 9 } // Sets the compression level.
@@ -35,7 +35,7 @@ const archiveSpecs = (bsConfig, filePath) => {
3535

3636
archive.pipe(output);
3737

38-
var packageJSON = JSON.stringify({devDependencies: bsConfig.npm_dependencies}, null, 4);
38+
var packageJSON = JSON.stringify({devDependencies: runSettings.npm_dependencies}, null, 4);
3939

4040
let allowedFileTypes = [ 'js', 'json', 'txt', 'ts' ]
4141
allowedFileTypes.forEach(fileType => {

bin/runner.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,6 @@ var argv = yargs
3737
return require('./commands/init')(argv);
3838
}
3939
})
40-
.command('update-config', Constants.cliMessages.UPDATE_CONFIG.INFO, function(yargs) {
41-
argv = yargs
42-
.usage('usage: $0 update-config')
43-
.options('cf', {
44-
alias: 'config-file',
45-
describe: Constants.cliMessages.UPDATE_CONFIG.CONFIG_DEMAND_DESC,
46-
default: '/browserstack.json',
47-
type: 'string',
48-
nargs: 1,
49-
demand: true,
50-
demand: Constants.cliMessages.UPDATE_CONFIG.CONFIG_DEMAND
51-
})
52-
.help('help')
53-
.wrap(null)
54-
.argv
55-
56-
if (checkCommands(yargs, argv, 1)) {
57-
return require('./commands/updateConfig')(argv);
58-
}
59-
})
6040
.command('build-info', Constants.cliMessages.BUILD.INFO, function(yargs) {
6141
argv = yargs
6242
.usage('usage: $0 <buildId>')

bin/templates/configTemplate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ module.exports = function () {
1414
"run_settings": {
1515
"cypress_proj_dir" : "/dir/to/cypress.json",
1616
"project": "project-name",
17-
"customBuildName": "build-name"
17+
"customBuildName": "build-name",
18+
"npm_dependencies": {
19+
}
1820
},
1921
"connection_settings": {
2022
"local": false,
2123
"localIdentifier": null
2224
},
23-
"npm_dependencies": {
24-
}
2525
}
2626
var EOL = require('os').EOL
2727
var file = [

0 commit comments

Comments
 (0)