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

Commit

Permalink
chore: remove deprecated package options
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The package options `--template` and `--target` have been removed, now accepting a path to a file instead of a directory.

* use `package -f` instead of `package --template`
* use `package -f` instead of `package --target`

Examples:

* `package --template config/deployments/foo` becomes `package -f config/deployments/foo/package.xml`
  • Loading branch information
amtrack committed Jun 28, 2018
1 parent d34c3a8 commit da83b80
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Examples:
| xargs -0 force-dev-tool deploy --runTests

Deploying with running only test classes being contained in a deployment
$ force-dev-tool package grep 'ApexClass/Test_*' --template config/deployments/mock \
$ force-dev-tool package -f config/deployments/mock/package.xml grep 'ApexClass/Test_*' \
| cut -d '/' -f 2 \
| xargs -0 force-dev-tool deploy -d config/deployments/mock --runTests
```
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var doc = "Usage:\n" +
" | xargs -0 force-dev-tool deploy --runTests\n" +
"\n" +
" Deploying with running only test classes being contained in a deployment\n" +
" $ force-dev-tool package grep 'ApexClass/Test_*' --template config/deployments/mock \\\n" +
" $ force-dev-tool package -f config/deployments/mock/package.xml grep 'ApexClass/Test_*' \\\n" +
" | cut -d '/' -f 2 \\\n" +
" | xargs -0 force-dev-tool deploy -d config/deployments/mock --runTests";

Expand Down
6 changes: 2 additions & 4 deletions lib/cli/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ var doc = "Usage:\n" +
" -p, --no-recursive Only index parent objects of metadata components\n" +
" -m, --include-managed Include writable components from managed packages\n" +
" --custom-only Only index custom metadata components\n" +
" --template=<template> DEPRECATED! Use `-f` instead.\n" +
" --target=<target> DEPRECATED! Use `-f` instead.\n" +
"\n" +
"Examples:\n" +
" Generating a package.xml based on a remote fetch result\n" +
Expand Down Expand Up @@ -75,8 +73,8 @@ SubCommand.prototype.constructor = SubCommand;
SubCommand.prototype.process = function(proc, callback) {
var self = this;
self.opts = self.docopt();
var templatePath = self.opts['--template'] ? path.resolve(self.opts['--template']) : self.project.storage.getPackageXmlPath();
var targetPath = self.opts['--target'] ? path.resolve(self.opts['--target']) : self.project.storage.getPackageXmlPath();
var templatePath = self.project.storage.getPackageXmlPath();
var targetPath = self.project.storage.getPackageXmlPath();
if (self.opts['--file']) {
templatePath = path.resolve(self.opts['--file']);
targetPath = path.resolve(self.opts['--file']);
Expand Down

0 comments on commit da83b80

Please sign in to comment.