Dragon Breath
Dragon Breath is a lightweight package manager primarily for use with Salesforce. It uses git repositories (imported as submodules). It is a bit like rubygems except without any central management.
The basic way things work is:
(1) You define a list of packages you want to import (2) Dragon Breath installs them as git submodules and imports all the files into a single central directory, adding any missing metadata (3) Dragon Breath exports all these to your project directoryThis is most excellent for when you commonly use similar stylesheets, test utilities, etc. across multiple projects. With Dragon Breath you only need to keep these in a single (or multiple) git repos and you can nearly effortlessly follow the DRY principle with full version control.
At the moment other commonly used libraries, including Apex-Commons, are available as distinct git repositories. This allows you to easily use string methods, HTTPUtils, list methods, etc. that are not available in standard Apex without importing the entire library.
Basic usage is as follows:
bash add.sh git_repo_address project_folder
This adds a project to your app as a git submodule.
Example:
bash add.sh git
@github.com:apex-commons/StringUtils.git ApexCommonsStringUtils
This adds the submodule to your git repository in the folder submodules/ApexCommonsStringUtils. It also adds an entry to the SUBMODPATHS file.
If you later decie you don’t want to use the module, simply edit it away in the SUBMODPATHS file.
The next step is to update:
bash update.sh
This updates each submodule to the master, copies the files so they are ready for deployment, and (via a ruby script) generates any missing meta xml files. This allows you to keep chunky xml files outside of your repositories if you want.
To export you must update entries in the PROJECTPATHS file.
Add the project path to your PROJECTPATH file:
/SalesforceProjects/Pipeline
Now you are ready to export:
bash export.sh
That’s all. All of the files will now be in your project path and ready for deployment via the Force.com IDE, Ant, MavensMate, or whatever deployment tool you use.
To recap, four basic steps:
- Add project paths (add.sh)
- Run update script (update.sh)
- Add paths for export (edit PROJECTPATHS)
- Export (export.sh)