1 | module.exports = {
|
2 | description: 'deploy source to an org',
|
3 | longDescription: 'Deploys metadata in source format to an org.',
|
4 | help: `Use this command to deploy source (metadata that’s in source format) to an org.
|
5 | To take advantage of change tracking with scratch orgs, use "sfdx force:source:push".
|
6 | To deploy metadata that’s in metadata format, use "sfdx force:mdapi:deploy".
|
7 |
|
8 | The source you deploy overwrites the corresponding metadata in your org. This command does not attempt to merge your source with the versions in your org.
|
9 |
|
10 | To run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue to use the CLI.
|
11 | To check the status of the job, use force:source:deploy:report.
|
12 |
|
13 | If the comma-separated list you’re supplying contains spaces, enclose the entire comma-separated list in one set of double quotes.
|
14 |
|
15 | Examples:
|
16 |
|
17 | To deploy the source files in a directory:
|
18 | $ sfdx force:source:deploy -p path/to/source
|
19 | To deploy a specific Apex class and the objects whose source is in a directory:
|
20 | $ sfdx force:source:deploy -p path/to/apex/classes/MyClass.cls,path/to/source/objects
|
21 | To deploy source files in a comma-separated list that contains spaces:
|
22 | $ sfdx force:source:deploy -p "path/to/objects/MyCustomObject/fields/MyField.field-meta.xml, path/to/apex/classes"
|
23 |
|
24 | To deploy all Apex classes:
|
25 | $ sfdx force:source:deploy -m ApexClass
|
26 | To deploy a specific Apex class:
|
27 | $ sfdx force:source:deploy -m ApexClass:MyApexClass
|
28 | To deploy all custom objects and Apex classes:
|
29 | $ sfdx force:source:deploy -m CustomObject,ApexClass
|
30 | To deploy all Apex classes and two specific profiles (one of which has a space in its name):
|
31 | $ sfdx force:source:deploy -m "ApexClass, Profile:My Profile, Profile: AnotherProfile"
|
32 |
|
33 | To deploy all components listed in a manifest:
|
34 | $ sfdx force:source:deploy -x path/to/package.xml
|
35 |
|
36 | To run the tests that aren’t in any managed packages as part of a deployment:
|
37 | $ sfdx force:source:deploy -m ApexClass -l RunLocalTests
|
38 |
|
39 | To check whether a deployment would succeed (to prepare for Quick Deploy):
|
40 | $ sfdx force:source:deploy -m ApexClass -l RunAllTestsInOrg -c
|
41 |
|
42 | To deploy an already validated deployment (Quick Deploy):
|
43 | $ sfdx force:source:deploy -q 0Af9A00000FTM6pSAH`,
|
44 | sourcePathDescription: 'comma-separated list of paths to the local source files to deploy',
|
45 | sourcePathLongDescription: 'A comma-separated list of paths to the local source files to deploy. ' +
|
46 | 'The supplied paths can be to a single file (in which case the operation is applied to only one file) or to a folder ' +
|
47 | '(in which case the operation is applied to all metadata types in the directory and its sub-directories).' +
|
48 | '\nIf you specify this parameter, don’t specify --manifest or --metadata.',
|
49 | manifestDescription: 'file path for manifest (package.xml) of components to deploy',
|
50 | manifestLongDescription: 'The complete path for the manifest (package.xml) file that specifies the components to deploy.' +
|
51 | '\nIf you specify this parameter, don’t specify --metadata or --sourcepath.',
|
52 | metadataParamDescription: 'comma-separated list of metadata component names',
|
53 | metadataParamLongDescription: 'A comma-separated list of names of metadata components to deploy to the org.',
|
54 | SourceElementDoesNotExist: 'The %s named %s was not found in the workspace.',
|
55 | sourcedeployFailed: 'Deploy failed.'
|
56 | };
|