Skip to content

Commit

Permalink
[skip ci] Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tmspzz committed Nov 9, 2018
1 parent 7584598 commit 62e108e
Showing 1 changed file with 42 additions and 2 deletions.
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Trusted by:
- [Cache](#cache)
- [RepositoryMap](#repositorymap)
- [IgnoreMap](#ignoremap)
- [CurrentMap](#currentmap)
- [Multiple Aliases](#multiple-aliases)
- [Static Frameworks](#static-frameworks)
- [Platforms](#platforms)
Expand Down Expand Up @@ -110,6 +111,8 @@ $ vi Cartfile # point to the new version of the framework
$ carthage update && rome upload
```

If you are running Rome in the context of a framework and want to [upload](#uploading) the current framework see [CurrentMap](#currentmap).

### Consumer workflow

```bash
Expand All @@ -124,6 +127,8 @@ $ vi Cartfile.resolved # point to the new version of the framework
$ rome download
```

If you are running Rome in the context of a framework and want to [download](#downloading) the current framework see [CurrentMap](#currentmap).

### CI workflow

A CI can be both consumer and producer.
Expand All @@ -149,6 +154,8 @@ If no frameworks are missing, the `awk` pipe to `carthage` will fail and the res
You can use the [fastlane plugin for Rome](#use-rome-with-fastlane) to implement
a CI workflow too.

If you are running Rome in the context of a framework and want to [upload](#uploading), [download](#downloading) or [list](#listing) the current framework see [CurrentMap](#currentmap).

## Set up

If you plan to use Amazon's S3 as a cache, then follow the next three steps:
Expand Down Expand Up @@ -246,14 +253,16 @@ The Romefile has three purposes:
1. Specifies what caches to use - `cache` key. This key is __required__.
1. Allows to use custom name mappings between repository names and framework names - `repositoryMap` key. This key is __optional__ and can be omitted.
1. Allows to ignore certain framework names - `ignoreMap` key. This key is __optional__ and can be omitted.
1. Allows to specify the current framework's name(s) - `currentMap` key. This key is __optional__ and can be omitted.

#### Structure

A Romefile is made of 3 objects, of which only one, the `cache`, is mandatory.
A Romefile is made of 4 objects, of which only one, the `cache`, is required.

- A `cache` definition object
- A `repositoryMap` made of a list of `Romefile Entry`
- An `ignoreMap` made of a list of `Romefile Entry`
- An `ignoreMap` made of a list of `Romefile Entry`
- A ``currentMap` made of a list of `Romefile Entry`

Each `Romefile Entry` is made of:

Expand Down Expand Up @@ -283,6 +292,9 @@ repositoryMap: # optional
ignoreMap:
- GDCWebServer:
- name: GDCWebServer
currentMap:
- animal-names-framework:
- name: AnimalNames
```
#### Cache
Expand Down Expand Up @@ -375,6 +387,34 @@ ignoreMap:

Each entry in the `IgnoreMap` is also a `Romefile Entry` and supports all keys.

#### CurrentMap
__By default the `currentMap` is not used__. Specify `--no-skip-current` as a command line option to use it.
It is supported by Rome versions greater than `0.18.x.y` and can be specified only in YAML.

The `currentMap` contains the mappings of repository and framework name(s) that describe the current framework.
This is particularly useful if you want to use Rome in the context of a framework. It is the [equivalent](https://github.com/Carthage/Carthage#share-your-xcode-schemes) of
[Carthage's `--no-skip-current`](https://github.com/Carthage/Carthage#use-travis-ci-to-upload-your-tagged-prebuilt-frameworks).

```yaml
currentMap:
- Alamofire:
- name: Alamofire
```
Each entry in the `currentMap` is also a `Romefile Entry` and supports all keys.

The `currentMap` is __subject to the ignores specified in the `ignoreMap`__.
If you explicitly specify names of frameworks to [upload](#uploading), [download](#downloading) or [list](listing) on the command line,
you don't need to pass `--no-skip-current` to use the `currentMap`. Just specify the name(s) of the current framework.

The version of the current framework is determined by

```
git describe --tags --exact-match `git rev-parse HEAD`
```
__If the commands does not resolve to any tag, the HEAD commit hash from `git rev-parse HEAD` is used as version.__
#### Multiple Aliases
Suppose you have a framework `Framework` that builds two targets, `t1` and `t2`,
Expand Down

0 comments on commit 62e108e

Please sign in to comment.