1 | # Ember-cli-deploy-display-revisions
|
2 |
|
3 | [![](https://ember-cli-deploy.github.io/ember-cli-deploy-version-badges/plugins/ember-cli-deploy-display-revisions.svg)](http://ember-cli-deploy.github.io/ember-cli-deploy-version-badges/)
|
4 |
|
5 | Display a list of deployed revisions using [ember-cli-deploy](https://github.com/ember-cli/ember-cli-deploy). This plugin is for `ember-cli-deploy` >= 0.5.0.
|
6 |
|
7 | ## Installation
|
8 |
|
9 | * `ember install ember-cli-deploy-display-revisions`
|
10 |
|
11 | ## Configuration Options
|
12 |
|
13 | ### Defaults
|
14 |
|
15 | ```
|
16 | ENV['display-revisions'] = {
|
17 | amount: 10,
|
18 | revisions: function(context) {
|
19 | return context.revisions;
|
20 | }
|
21 | }
|
22 | ```
|
23 |
|
24 | ### amount
|
25 |
|
26 | Number of revisions displayed in the results table
|
27 |
|
28 | *Default:* `10`
|
29 |
|
30 | ### revisions
|
31 |
|
32 | The data to be displayed
|
33 |
|
34 | *Default:* `context.revisions`, usually received from `fetchRevisions`
|
35 |
|
36 | ## Usage
|
37 |
|
38 | * `ember deploy:list <environment>` to list the latest 10 revisions
|
39 | * `ember deploy:list --amount <N> <environment>` to list the latest <N> revisions
|
40 |
|
41 | ## Passing revisions
|
42 |
|
43 | `ember-cli-deploy-display-revisions` expects the `fetchRevisions` to be implemented by your index plugin, filling the `revisions` variable in context in the following format:
|
44 |
|
45 | ```
|
46 | [
|
47 | {
|
48 | revision: 'abc123', // mandatory
|
49 | version: 'v1',
|
50 | timestamp: 1438232435000, // milliseconds since epoch
|
51 | deployer: 'cats'
|
52 | },
|
53 | {
|
54 | revision: 'def456',
|
55 | version: 'v2',
|
56 | timestamp: 1032123128000,
|
57 | deployer: 'dogs',
|
58 | active: true // indicate whether this revision is activated
|
59 | }
|
60 | ]
|
61 | ```
|
62 |
|
63 | Omitted keys are not displayed in listing the results.
|
64 |
|
65 | ## Tests
|
66 |
|
67 | * yarn test
|
68 |
|
69 | ## Why `ember build` and `ember test` don't work
|
70 |
|
71 | Since this is a node-only ember-cli addon, this package does not include many files and dependencies which are part of ember-cli's typical `ember build` and `ember test` processes.
|