Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
deprecate aliases for deploy: deployTest, validate and `validat…
Browse files Browse the repository at this point in the history
…eTest`
  • Loading branch information
amtrack committed Dec 4, 2016
1 parent 1fe7c44 commit fe74f01
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 34 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ Commands:
info Show describe information from a remote
package Generate a package.xml file from local describe information
retrieve Retrieve metadata specified in package.xml
deploy Deploy metadata specified in a package.xml
deployTest DEPRECATED! Use `deploy -t` instead
validate DEPRECATED! Use `deploy -c` instead
validateTest DEPRECATED! Use `deploy -ct` instead
test Execute unit tests
validate Validate metadata deployment
validateTest Validate metadata deployment and run local unit tests
deploy Deploy metadata
deployTest Deploy metadata and run local unit tests
changeset Create a changeset/deployment from a unified diff input or cli args
query Execute a SOQL query returing JSON
bulk (alpha) Import/export data in CSV format using the bulk API
Expand Down
10 changes: 5 additions & 5 deletions bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ var doc = "force-dev-tool.\n" +
" fetch Fetch describe information from a remote\n" +
" info Show describe information from a remote\n" +
" package Generate a package.xml file from local describe information\n" +
" retrieve Retrieve metadata specified in package.xml\n" +
" retrieve Retrieve metadata specified in a package.xml\n" +
" deploy Deploy metadata specified in a package.xml\n" +
" deployTest DEPRECATED! Use `deploy -t` instead\n" +
" validate DEPRECATED! Use `deploy -c` instead\n" +
" validateTest DEPRECATED! Use `deploy -ct` instead\n" +
" test Execute unit tests\n" +
" validate Validate metadata deployment\n" +
" validateTest Validate metadata deployment and run local unit tests\n" +
" deploy Deploy metadata\n" +
" deployTest Deploy metadata and run local unit tests\n" +
" changeset Create a changeset/deployment from a unified diff input or cli args\n" +
" query Execute a SOQL query returing JSON\n" +
" bulk (alpha) Import/export data in CSV format using the bulk API\n" +
Expand Down
28 changes: 18 additions & 10 deletions lib/cli/deployTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@ var DeployCommand = require('./deploy');
var doc = "Usage:\n" +
" force-dev-tool deployTest [options] [<remote>]\n" +
"\n" +
"DEPRECATED! Use `deploy --test` (or short `deploy -t`) instead.\n" +
"\n" +
"Options:\n" +
" -d=<directory> Directory containing the metadata and package.xml.\n" +
" -f=<zipFile> Zip file containing the metadata and package.xml.";
" -c --checkOnly Perform a test deployment (validation).\n" +
" --runTests=<classNames> Names of test classes (one argument, separated by whitespace).\n" +
" --runAllTests Run all tests including tests of managed packages.\n" +
" --purgeOnDelete Don't store deleted components in the recycle bin.\n" +
" -d=<directory> Directory to be deployed [default: src].\n" +
" -f=<zipFile> Zip file to be deployed.";

var Subcommand = module.exports = function(project) {
var SubCommand = module.exports = function(project) {
var self = this;
DeployCommand.call(self, project, doc);
self.action = "Deployment with test execution";
self.deployOpts = {
rollbackOnError: true,
testLevel: 'RunLocalTests'
};
};

Subcommand.prototype = Object.create(DeployCommand.prototype);
Subcommand.prototype.constructor = Subcommand;
SubCommand.prototype = Object.create(DeployCommand.prototype);
SubCommand.prototype.constructor = SubCommand;

SubCommand.prototype.process = function(proc, callback) {
var self = this;
self.opts = self.docopt();
self.opts['--test'] = true;
return DeployCommand.prototype.process.call(self, proc, callback);
};
22 changes: 15 additions & 7 deletions lib/cli/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@ var DeployCommand = require('./deploy');
var doc = "Usage:\n" +
" force-dev-tool validate [options] [<remote>]\n" +
"\n" +
"DEPRECATED! Use `deploy --checkOnly` (or short `deploy -c`) instead.\n" +
"\n" +
"Options:\n" +
" -d=<directory> Directory containing the metadata and package.xml.\n" +
" -f=<zipFile> Zip file containing the metadata and package.xml.";
" -t --test Run local tests.\n" +
" --runTests=<classNames> Names of test classes (one argument, separated by whitespace).\n" +
" --runAllTests Run all tests including tests of managed packages.\n" +
" --purgeOnDelete Don't store deleted components in the recycle bin.\n" +
" -d=<directory> Directory to be deployed [default: src].\n" +
" -f=<zipFile> Zip file to be deployed.";

var SubCommand = module.exports = function(project) {
var self = this;
DeployCommand.call(self, project, doc);
self.action = "Validation";
self.deployOpts = {
rollbackOnError: true,
checkOnly: true
};
};

SubCommand.prototype = Object.create(DeployCommand.prototype);
SubCommand.prototype.constructor = SubCommand;

SubCommand.prototype.process = function(proc, callback) {
var self = this;
self.opts = self.docopt();
self.opts['--checkOnly'] = true;
return DeployCommand.prototype.process.call(self, proc, callback);
};
23 changes: 15 additions & 8 deletions lib/cli/validateTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,27 @@ var DeployCommand = require('./deploy');
var doc = "Usage:\n" +
" force-dev-tool validateTest [options] [<remote>]\n" +
"\n" +
"DEPRECATED! Use `deploy --checkOnly --test` (or short `deploy -ct`) instead.\n" +
"\n" +
"Options:\n" +
" -d=<directory> Directory containing the metadata and package.xml.\n" +
" -f=<zipFile> Zip file containing the metadata and package.xml.";
" --runTests=<classNames> Names of test classes (one argument, separated by whitespace).\n" +
" --runAllTests Run all tests including tests of managed packages.\n" +
" --purgeOnDelete Don't store deleted components in the recycle bin.\n" +
" -d=<directory> Directory to be deployed [default: src].\n" +
" -f=<zipFile> Zip file to be deployed.";

var SubCommand = module.exports = function(project) {
var self = this;
DeployCommand.call(self, project, doc);
self.action = "Validation with test execution";
self.deployOpts = {
rollbackOnError: true,
checkOnly: true,
testLevel: 'RunLocalTests'
};
};

SubCommand.prototype = Object.create(DeployCommand.prototype);
SubCommand.prototype.constructor = SubCommand;

SubCommand.prototype.process = function(proc, callback) {
var self = this;
self.opts = self.docopt();
self.opts['--checkOnly'] = true;
self.opts['--test'] = true;
return DeployCommand.prototype.process.call(self, proc, callback);
};

0 comments on commit fe74f01

Please sign in to comment.