You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as a shared cache for frameworks built with [Carthage](https://github.com/Carthage/Carthage).
14
15
@@ -34,6 +35,7 @@ Trusted by:
34
35
- [Setting up AWS credentials](#setting-up-aws-credentials)
35
36
- [Selecting the AWS Region](#selecting-the-aws-region)
36
37
- [Setting up endpoint override for Minio, Ceph, or other S3 compatible stores](#setting-up-endpoint-override)
38
+
-[Custom Engine](#customengine)
37
39
- [Romefile](#romefile)
38
40
- [Cache](#cache)
39
41
- [RepositoryMap](#repositorymap)
@@ -257,6 +259,25 @@ Default port for `http` endpoints is __9000__ if the port is left unspecified.
257
259
258
260
Alternatively the endpoint can also be specified by setting an `AWS_ENDPOINT` environment variable.
259
261
262
+
### Custom Engine
263
+
You can write your own script that Rome will use as engine to execute upload/download/list commands. You start by specifying the path to a script or executable in your [Romefile](#romefile) as shown in the example [structure](#structure).
264
+
Rome will invoke the specified script or executable with three commands and different parameters based on the action to perform:
265
+
266
+
-`./script.sh upload local-path remote-path`
267
+
-`./script.sh download remote-path local-path`
268
+
-`./script.sh list remote-path`
269
+
270
+
For example, if your [Romefile](#romefile) specifies `engine: script.sh`, Rome will execute the following command when uploading/downloading/listing a framework:
./script.sh list Alamofire/iOS/Alamofire.framework-4.8.2.zip
275
+
```
276
+
277
+
The script should take the given `remote-path`, carry out its logic to retrieve the artifact and place it at `local-path`. Please refer to the [cache structure](#cachestructure) definition for more information on the cache is constructed.
278
+
279
+
For an example of a custom engine, take a look at [engine.sh](https://github.com/blender/Rome/blob/master/integration-tests/engine.sh) which is used in the integration tests to simply copy artifacts in a different directory. Infinite uses cases are opened by using a custom engine, such as uploading artifacts to any non-compatible S3 storage system.
280
+
260
281
### Romefile
261
282
262
283
#### About the format
@@ -299,10 +320,11 @@ A Romefile looks like this:
299
320
300
321
```yaml
301
322
cache: # required
302
-
local: ~/Library/Caches/Rome # optional
303
-
# at least one between `local` and `s3Bucket` is required
304
-
s3Bucket: ios-dev-bucket # optional
305
-
# at least one between `local` and `s3Bucket` is required
323
+
# at least one of the following is required:
324
+
local: ~/Library/Caches/Rome # optional and can be combined with either a `s3Bucket` or `engine`
325
+
s3Bucket: ios-dev-bucket # optional and can be combined with `local`
326
+
engine: script.sh # optional and can be combined with `local`
327
+
306
328
repositoryMap: # optional
307
329
- better-dog-names: # entry that does not follow
308
330
# the "Organization/FrameworkName" convention.
@@ -326,13 +348,16 @@ currentMap:
326
348
The cache __must__ contain __at least one__ between:
327
349
- the name of the S3 Bucket to upload/download to/from. The key `s3Bucket` is __optional__.
328
350
- the path to local directory to use as an additional cache. The key `local` is __optional__.
351
+
- the path to a custom engine to use as an additional cache. The key `engine` is __optional__.
329
352
330
353
```yaml
331
354
cache: # required
332
355
local: ~/Library/Caches/Rome # optional
333
-
# at least one between `local`and `s3Bucket` is required
356
+
# at least one between `local`, `s3bucket` and `engine` is required
334
357
s3Bucket: ios-dev-bucket # optional
335
-
# at least one between `local` and `s3Bucket` is required
358
+
# at least one between `local`, `s3bucket` and `engine` is required
359
+
engine: script.sh # optional
360
+
# at least one between `local`, `s3bucket` and `engine` is required
336
361
```
337
362
338
363
This is already a viable Romefile.
@@ -491,7 +516,6 @@ The above means that `t1` is only available for `iOS` and `Mac`.
491
516
The `--platforms` command line options can be used to futher limit the Rome command to a
492
517
specific subset of the supported platfroms.
493
518
494
-
495
519
### Cache Structure
496
520
497
521
The following describes the structure of the cache that Rome creates and manages.
0 commit comments