Build metadata fields for CI

❗️

This part of the guide only applies when using the REST API or the Emerge CLI .

The Emerge Fastlane Plugin for iOS and the Emerge Gradle Plugin for Android take care of uploading the correct information for your builds. If you are using Fastlane or Gradle. We recommend following those guides for the simplest integration.

You should consider including the following metadata fields with your uploads in CI:

FieldRequired
filenameYes (both base and head)
branchYes (both base and head)
shaYes (both base and head)
repoNameYes (both base and head)
tagNo (defaults to release if not provided)
prNumberOnly for head builds
baseShaOnly for head builds
previousShaNo, but encouraged for all builds (required for certain features)
appIdSuffixNo (more info)

Tags

tag is an optional parameter that defaults to release if not provided when uploading. We recommend changing this value for head builds (eg using pull_request) and setting it to default for builds of your default branch.

You can set this value to anything you'd like. For example, you might want to track sizes per device architecture using x86_64 and arm64 tags.

SHA and base SHA

The sha and baseSha parameters are used to provide Emerge information about the position of your build within your version control system structure. Both values should be sent using the SHA's long form. If you send a shortened SHA value this may result in errors.

The sha field should be the commit SHA that your upload was built from. This represents the HEAD position for the build, whether the build is on main or a branch.

The baseSha field is used specifically for branch builds. This field represents the point in your git tree that your branch was created from, allowing Emerge to identify all the changes on a branch. The baseSha should remain the same for all builds on a branch, unless the branch is rebased.

Previous SHA

The previousSha parameter is just like the sha param, but for the commit before the current one (in git terms: HEAD^).

It similarly should be sent using the SHA's long form.

We use this value to stitch together a historical relationship across your uploads, without needing code access in your repository. This field enables new features like Snapshot History which allow you to conveniently see changes over time!