diff --git a/docs/tools/civibuild.md b/docs/tools/civibuild.md index c5acf97844eec03ace4eac6805ed279bd644d10e..6a02f566f45fc6aa7b79c5e0bab5c452a008c469 100644 --- a/docs/tools/civibuild.md +++ b/docs/tools/civibuild.md @@ -76,6 +76,31 @@ The `--civi-ver` argument will accept any branch or version tag. *Note: the 4.7 You can also specify `--patch` with a pull request URL to apply those changes on top of your CiviCRM version. +### Custom build types + +By default, `civibuild` looks for build types in `buildkit/app/config/`. +You may define new build types by creating similar folders. For example, +these steps would make personal folder (`$HOME/src/extra_site_configs`) +and register a custom build type `snazzy` (based on the `wp-demo` type). + +```bash +## Make your custom folder +$ mkdir "$HOME/src/extra_site_configs" + +## Copy an example build-type. Edit to taste. +$ cp -r buildkit/app/config/wp-demo "$HOME/src/extra_site_configs/snazzy" +$ vi "$HOME/src/extra_site_configs/snazzy/download.sh" +$ vi "$HOME/src/extra_site_configs/snazzy/install.sh" + +## Build the site +$ export CIVIBUILD_PATH="$HOME/src/extra_site_configs:$CIVIBUILD_PATH" +$ civibuild create snazzy +``` + +!!! tip "Put `CIVIBUILD_PATH` in `civibuild.conf`" + You may set `CIVIBUILD_PATH` explicitly. However, it will be easier to use + if you make the change persistent. See: [Settings: civibuild.conf](#settings-civibuild) + ## Build aliases For developers who work with several CMSs and several versions of Civi, it's useful to have a naming convention and shorthand for the most common configurations. Civibuild includes aliases (in `src/civibuild.aliases.sh`) like "d44" and "wpmaster":