Skip to content

Commit 8025b46

Browse files
committed
Merge pull request #10 from lpetre/doc_update
Updating docs for new options
2 parents 17d61af + 9d32791 commit 8025b46

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

README.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ The region your bucket is located in.
6464

6565
*Default:* `'us-east-1'`
6666

67-
### currentRevisionIdentifier
67+
### prefix
6868

69-
To be able to display an indicator in the revisions list that points to the current active revision this plugin uploads a json file that identifies the currently deployed revision to your bucket. You can change the file-name of this file with this option.
69+
A directory within the `bucket` that the files should be uploaded in to.
7070

71-
*Default:* `'current.json'`
71+
*Default:* `''`
7272

7373
### filePattern
7474

75-
A file matching this pattern will be uploaded to S3.
75+
A file matching this pattern will be uploaded to S3. The active key in S3 will be a combination of the `bucket`, `prefix`, `filePattern`. The versioned keys will have `revisionKey` appended.
7676

7777
*Default:* `'index.html'`
7878

@@ -82,18 +82,20 @@ The root directory where the file matching `filePattern` will be searched for. B
8282

8383
*Default:* `context.distDir`
8484

85-
### keyPrefix
86-
87-
The prefix to be used for the key under which file will be uploaded to S3. The key will be a combination of the `keyPrefix` and the `revisionKey`. By default this option will use the `project.name()` property from the deployment context.
88-
89-
*Default:* `context.project.name() + ':index'`
90-
9185
### revisionKey
9286

9387
The unique revision number for the version of the file being uploaded to S3. The key will be a combination of the `keyPrefix` and the `revisionKey`. By default this option will use either the `revisionKey` passed in from the command line or the `revisionKey` property from the deployment context.
9488

9589
*Default:* `context.commandLineArgs.revisionKey || context.revisionKey`
9690

91+
### s3Client
92+
93+
The underlying S3 library used to upload the files to S3. This allows the user to use the default upload client provided by this plugin but switch out the underlying library that is used to actually send the files.
94+
95+
The client specified MUST implement functions called `getObject` and `putObject`.
96+
97+
*Default:* the default S3 library is `aws-sdk`
98+
9799
### How do I activate a revision?
98100

99101
A user can activate a revision by either:
@@ -120,16 +122,24 @@ ENV.pipeline {
120122

121123
### What does activation do?
122124

123-
When *ember-cli-deploy-s3-index* uploads a file to S3, it uploads it under the key defined by a combination of the two config properties `keyPrefix` and `revisionKey`.
125+
When *ember-cli-deploy-s3-index* uploads a file to S3, it uploads it under the key defined by a combination of the four config properties `bucket`, `prefix`, `filePattern` and `revisionKey`.
124126

125-
So, if the `keyPrefix` was configured to be `deploy-test:index` and there had been a few revisons deployed, then your bucket might look something like this:
127+
So, if the `filePattern` was configured to be `index.html` and there had been a few revisons deployed, then your bucket might look something like this:
126128

127-
![s3-index-bucket](http://i.imgur.com/wmiaYyK.png)
129+
```bash
130+
$ aws s3 ls s3://<bucket>/
131+
PRE assets/
132+
2015-09-27 07:25:26 585 crossdomain.xml
133+
2015-09-27 07:47:42 1207 index.html
134+
2015-09-27 07:25:51 1207 index.html:a644ba43cdb987288d646c5a97b1c8a9
135+
2015-09-27 07:20:27 1207 index.html:61cfff627b79058277e604686197bbbd
136+
2015-09-27 07:19:11 1207 index.html:9dd26dbc8f3f9a8a342d067335315a63
137+
```
128138

129139
Activating a revision would copy the content of the passed revision to `index.html` which is used to host your ember application via the [static web hosting](https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html) feature built into S3.
130140

131141
```bash
132-
$ ember deploy:activate --revision deploy-test:index:18613f3a225d29ec065240a1499f8545
142+
$ ember deploy:activate --revision a644ba43cdb987288d646c5a97b1c8a9
133143
```
134144

135145
### When does activation occur?

0 commit comments

Comments
 (0)