Skip to content

Commit

Permalink
Merge pull request #18 from EmergeTools/telkins/README
Browse files Browse the repository at this point in the history
Update README
  • Loading branch information
trevor-e authored Mar 13, 2024
2 parents 32cbc6f + 36fab3c commit f8dfd4c
Showing 1 changed file with 45 additions and 9 deletions.
54 changes: 45 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,60 @@ fastlane add_plugin emerge

## About Emerge

Fastlane plugin for Emerge
[Emerge](https://emergetools.com) offers a suite of products to help optimize app size, performance and quality. This plugin provides a set of actions to interact with the Emerge API.

## Run tests for this plugin
## Usage

To run both the tests, and code style validation, run
To get started, first obtain an [API token](https://docs.emergetools.com/docs/uploading-basics#obtain-an-api-key) for your organization. The API Token is used to authenticate with the Emerge API in each call.

```
rake
```
```ruby
# Your EMERGE_API_TOKEN is available on your Emerge profile page: https://www.emergetools.com/profile
ENV['EMERGE_API_TOKEN'] = 'COPIED_FROM_EMERGETOOLS_PROFILE'

To automatically fix many of the styling issues, use
platform {:ios} do
lane :app_size do
emerge()
end
end
```
rubocop -a

For a full list of available parameters run `fastlane action emerge`.

## Git Configuration

For build comparisons to work, Emerge needs the appropriate Git `sha` and `base_sha` values set on each build. Emerge will automatically compare a build at `sha` against the build we find matching the `base_sha` for a given application id. We also recommend setting `pr_number`, `branch`, and `repo_name` for the best experience.

For example:

- `sha`: `pr-branch-commit-1`
- `base_sha`: `main-branch-commit-1`
- `pr_number`: `42`
- `branch`: `my-awesome-feature`
- `repo_name`: `EmergeTools/hackernews`

Will compare the size difference of your pull request changes.

This plugin will automatically configure Git values for you assuming certain Github workflow triggers:

```yaml
on:
# Produce base builds with a 'sha' when commits are pushed to the main branch
push:
branches: [main]

# Produce branch comparison builds with `sha` and `base_sha` when commits are pushed
# to open pull requests
pull_request:
branches: [main]

...
```

If this doesn't cover your use-case, manually set the `sha` and `base_sha` values when calling the Emerge plugin.

## Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.
For any other issues and feedback about this plugin, please open a [GitHub issue](https://github.com/EmergeTools/fastlane-plugin-emerge/issues).

## Troubleshooting

Expand Down

0 comments on commit f8dfd4c

Please sign in to comment.