build_salesforce_package
Version:
Build Saleforce Package to be deployed using git diff
80 lines (58 loc) • 1.77 kB
Markdown
# Build Salesforce Package (Digital Deer)
>CLI library to build packages (based on a git Repo) and then deploy them in Salesforce
Mainly build to be used with jenkins or a server to handle GIT webhooks to deploy pull requests to selected Salesforce instances.
Once the repo is cloned, with the commands, you can easily build the package and deploy it.
| Metadata |Deployable|
|---------|-------|
| Aura | yes |
| Pages | yes |
| Components | yes |
| Classes | yes |
| triggers | yes |
| static resources | yes |
## Install
```bash
sudo npm install build_salesforce_package --global
```
## Help
Create a profile
| Options | Description |
| ------ | ------ |
| -k |Encryption key|
| -apiV |Api version (default 39)|
| -z |Zip|
```bash
build_salesforce_package add profileName name@example.com password login.salesforce.com -k 1234
```
List profiles
```bash
build_salesforce_package list
```
Remove profile
```bash
build_salesforce_package remove profileName
```
Build package (Based on a git branch)
| Options | Description |
| ------ | ------ |
| -z |Zip the package|
| -apiV |Api version (default 39)|
| -t |Target (to make a diff between 2 branches)|
|-p|Path to the src (default src/)|
|-k|Encryption key if used in the profile|
```bash
build_salesforce_package build name origin/fullsdbx --zip
```
Build package (Based on a diff of 2 branchs)
```bash
$ build_salesforce_package build --target origin/fullSdbx --path src/ -apiV 39 -z
```
## Usage
# Example (Need to be in the git repo)
```bash
$ build_salesforce_package add profile1 username password login.salesforce.com
$ build_salesforce_package build origin/fullSdbx --path src/ -apiV 39 -z
$ build_salesforce_package deploy profile1 --validate
```
## License
[MIT](http://vjpr.mit-license.org)