UNPKG

3.63 kBJavaScriptView Raw
1module.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.
5To take advantage of change tracking with scratch orgs, use "sfdx force:source:push".
6To deploy metadata that’s in metadata format, use "sfdx force:mdapi:deploy".
7
8The 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
10To run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue to use the CLI.
11To check the status of the job, use force:source:deploy:report.
12
13If the comma-separated list you’re supplying contains spaces, enclose the entire comma-separated list in one set of double quotes. On Windows, if the list contains commas, also enclose the entire list in one set of double quotes.
14
15Examples:
16
17To deploy the source files in a directory:
18 $ sfdx force:source:deploy -p path/to/source
19To 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"
21To 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
24To deploy all Apex classes:
25 $ sfdx force:source:deploy -m ApexClass
26To deploy a specific Apex class:
27 $ sfdx force:source:deploy -m ApexClass:MyApexClass
28To deploy all custom objects and Apex classes:
29 $ sfdx force:source:deploy -m "CustomObject,ApexClass"
30To 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
33To deploy all components listed in a manifest:
34 $ sfdx force:source:deploy -x path/to/package.xml
35
36To 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
39To check whether a deployment would succeed (to prepare for Quick Deploy):
40 $ sfdx force:source:deploy -m ApexClass -l RunAllTestsInOrg -c
41
42To 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:
46 'A comma-separated list of paths to the local source files to deploy. ' +
47 'The supplied paths can be to a single file (in which case the operation is applied to only one file) or to a folder ' +
48 '(in which case the operation is applied to all metadata types in the directory and its sub-directories).' +
49 '\nIf you specify this parameter, don’t specify --manifest or --metadata.',
50 manifestDescription: 'file path for manifest (package.xml) of components to deploy',
51 manifestLongDescription:
52 'The complete path for the manifest (package.xml) file that specifies the components to deploy. All child components are included.' +
53 '\nIf you specify this parameter, don’t specify --metadata or --sourcepath.',
54 metadataParamDescription: 'comma-separated list of metadata component names',
55 metadataParamLongDescription: 'A comma-separated list of names of metadata components to deploy to the org.',
56 SourceElementDoesNotExist: 'The %s named %s was not found in the workspace.',
57 sourcedeployFailed: 'Deploy failed.',
58 sourceDeployCheckOnlySuccess: '\nSuccessfully validated the deployment'
59};