Skip to content
This repository was archived by the owner on Jul 12, 2020. It is now read-only.

Commit 6fda6a8

Browse files
author
Ilya Radchenko
committed
Merge pull request #11 from maltescharenberg/master
Fixed 'runTest' command (added missing options).
2 parents c3d74de + b9204a3 commit 6fda6a8

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

run-test.js

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ module.exports = function(deps) {
4949
var next = this;
5050

5151
if (project){
52-
runOpts.project = project;
5352
next();
5453
} else {
5554
rl.question('Project name []: ', function (pr) {
5655
project = pr;
57-
runOpts.project = project;
5856
next();
5957
});
6058
}
@@ -63,11 +61,10 @@ module.exports = function(deps) {
6361
function getMessage() {
6462
var next = this;
6563
if (message) {
66-
runOpts.message = message;
6764
next();
6865
} else {
6966
rl.question('Commit message (optional): ', function (msg) {
70-
runOpts.message = msg;
67+
message = msg;
7168
next();
7269
})
7370
}
@@ -76,11 +73,22 @@ module.exports = function(deps) {
7673
function getBranch() {
7774
var next = this;
7875
if (branch) {
79-
runOpts.branch = branch;
8076
next();
8177
} else {
8278
rl.question('Branch (default: master): ', function (br) {
83-
runOpts.branch = br;
79+
branch = br;
80+
next();
81+
})
82+
}
83+
},
84+
85+
function getDeploy() {
86+
var next = this;
87+
if (deploy) {
88+
next();
89+
} else {
90+
rl.question('Deploy (y/n) (default: n): ', function (a) {
91+
deploy = a === 'y' ? true : undefined;
8492
next();
8593
})
8694
}
@@ -89,13 +97,21 @@ module.exports = function(deps) {
8997
function runTest() {
9098
runOpts.email = email;
9199
runOpts.password = password;
100+
runOpts.message = message;
101+
runOpts.project = project;
102+
runOpts.branch = branch;
103+
runOpts.deploy = deploy;
92104
run(runOpts);
93105
}
94106
);
95107
}
96108
else {
97109
runOpts.email = email;
98110
runOpts.password = password;
111+
runOpts.message = message;
112+
runOpts.project = project;
113+
runOpts.branch = branch;
114+
runOpts.deploy = deploy;
99115
run(runOpts);
100116
}
101117
}

0 commit comments

Comments
 (0)