# Build

The `build` command provides the ability to build either a complete or incremental deployment, which can then be deployed to a target JADE database.

<figure><img src="https://3850210453-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LiuZvEx90WVx-LnSKG_%2Fuploads%2FZ3raG8pLpBcDDddAKaeX%2Fimage.png?alt=media&#x26;token=4d10ba6b-74e6-4a01-9489-1d93fb557e07" alt=""><figcaption></figcaption></figure>

## Revisions

The [revision string](https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions) may refer to a single commit, in which case a complete deployment will be built.

```bash
jadegit build HEAD mul C:\temp\build
```

It may also refer to a [range of commits](https://git-scm.com/docs/git-rev-parse.html#_specifying_ranges), in which case an incremental deployment will be built, including any commands required to rename, delete, move classes, and any other special operations needed to upgrade schemas from the prior version.

```bash
jadegit build v0.1..v0.2 mul C:\temp\build
```

## Formats

The deployment format of the build is specified via a subcommand.

### Multiple Schema File Extract

The `mul` subcommand provides the ability to build a standard [multiple schema file extract](https://secure.jadeworld.com/JADETech/JADE2022/OnlineDocumentation/#resources/userguide/ch10schemaextractload/multiple_schema_file_syntax.htm).

<figure><img src="https://3850210453-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LiuZvEx90WVx-LnSKG_%2Fuploads%2FmqDLNmso9Ehm0BBYrC35%2Fimage.png?alt=media&#x26;token=e7ecb59c-1db2-42d9-8fab-68311328dc69" alt=""><figcaption></figcaption></figure>

The destination output directory is required, and an optional name may be specified which defines the name of the \*.mul file created.

```powershell
jadegit build v0.1..v0.2 mul -n "v0.2 Update" C:\temp\build
```

{% hint style="warning" %}
Due to JADE limitations, this format does not support the use of command files (needed to handle renames and other special operations).  Other deployment formats (to be implemented) will support command files.
{% endhint %}

### Scripted Deployment

The `pwsh` subcommand provides the ability to build a scripted deployment using PowerShell.

<figure><img src="https://3850210453-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LiuZvEx90WVx-LnSKG_%2Fuploads%2FnDRKohNIQOx6xPk30hp4%2Fimage.png?alt=media&#x26;token=dda71b6a-7f77-47b6-bf6d-0efb6928252e" alt=""><figcaption></figcaption></figure>

Use the following command to run the deployment from the output directory (copying to host of the target database beforehand if required).

```powershell
.\deploy.ps1 -bin "C:\Jade\bin" -path "C:\Jade\system" -ini "C:\Jade\jade.ini"
```

### Generic XML Format

The `xml` subcommand provides the ability to build a generic deployment, with an XML instruction file intended to be transformed/processed as needed by third parties to handle deploying/publishing updates in a customized manner.

<figure><img src="https://3850210453-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LiuZvEx90WVx-LnSKG_%2Fuploads%2FxnKZopLzG1KDHhFPIFL2%2Fimage.png?alt=media&#x26;token=ed674f5c-cf46-4a9a-91cd-93201e61d3b2" alt=""><figcaption></figcaption></figure>
