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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,15 @@ Thank you to all who took the time to contribute!
13
13
14
14
#### Community Contributions
15
15
16
-
-[#1](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/1) Create a tag form the hash of the index.html [@achambers](https://github.com/achambers)
17
-
-[#3](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/3) Updated to be in line with how ember-cli-deploy handles context data [@achambers](https://github.com/achambers)
18
-
-[#4](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/4) Remove dependency on index path [@achambers](https://github.com/achambers)
19
-
-[#5](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/5) Now filePattern is relative to the dist dir stored in `context.distDir`[@achambers](https://github.com/achambers)
20
-
-[#6](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/6) Rename index-hash to file-hash [@lukemelia](https://github.com/lukemelia)
21
-
-[#7](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/7) Change to use `configure` hook instead of `willDeploy`[@achambers](https://github.com/achambers)
22
-
-[#8](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/8) Renamed project and all references to `tags`[@achambers](https://github.com/achambers)
23
-
-[#9](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/9)`configure` primes the config with data from the deployment context [@achambers](https://github.com/achambers)
24
-
-[#10](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/10) Restructure to use ember-cli-deploy-plugin, and complete rename to em… [@lukemelia](https://github.com/lukemelia)
25
-
-[#12](https://github.com/zapnito/ember-cli-deploy-revision-key/pull/12) Update README for v0.5.0 [@achambers](https://github.com/achambers)
16
+
-[#1](https://github.com/zapnito/ember-cli-deploy-revision-data/pull/1) Create a tag form the hash of the index.html [@achambers](https://github.com/achambers)
17
+
-[#3](https://github.com/zapnito/ember-cli-deploy-revision-data/pull/3) Updated to be in line with how ember-cli-deploy handles context data [@achambers](https://github.com/achambers)
18
+
-[#4](https://github.com/zapnito/ember-cli-deploy-revision-data/pull/4) Remove dependency on index path [@achambers](https://github.com/achambers)
19
+
-[#5](https://github.com/zapnito/ember-cli-deploy-revision-data/pull/5) Now filePattern is relative to the dist dir stored in `context.distDir`[@achambers](https://github.com/achambers)
20
+
-[#6](https://github.com/zapnito/ember-cli-deploy-revision-data/pull/6) Rename index-hash to file-hash [@lukemelia](https://github.com/lukemelia)
21
+
-[#7](https://github.com/zapnito/ember-cli-deploy-revision-data/pull/7) Change to use `configure` hook instead of `willDeploy`[@achambers](https://github.com/achambers)
22
+
-[#8](https://github.com/zapnito/ember-cli-deploy-revision-data/pull/8) Renamed project and all references to `tags`[@achambers](https://github.com/achambers)
23
+
-[#9](https://github.com/zapnito/ember-cli-deploy-revision-data/pull/9)`configure` primes the config with data from the deployment context [@achambers](https://github.com/achambers)
24
+
-[#10](https://github.com/zapnito/ember-cli-deploy-revision-data/pull/10) Restructure to use ember-cli-deploy-plugin, and complete rename to em… [@lukemelia](https://github.com/lukemelia)
25
+
-[#12](https://github.com/zapnito/ember-cli-deploy-revision-data/pull/12) Update README for v0.5.0 [@achambers](https://github.com/achambers)
Copy file name to clipboardExpand all lines: README.md
+46-13Lines changed: 46 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
-
# ember-cli-deploy-revision-key
1
+
# ember-cli-deploy-revision-data
2
2
3
-
> An ember-cli-deploy plugin to generate a unique revision key based on the current build
3
+
> An ember-cli-deploy plugin to generate data about this deploy revision including a unique revision key based on the current build
4
4
5
5
<hr/>
6
6
**WARNING: This plugin is only compatible with ember-cli-deploy versions >= 0.5.0**
7
7
<hr/>
8
8
9
-
This plugin will generate a unique revision key for the current build. The revision key can be used to uniquely identify the particular version of the application.
9
+
This plugin will generate revison data for the current build. This data can be used by other plugins to understand more about the current revision being deployed.
10
+
The revision key included in the revison data can be used to uniquely identify the particular version of the application.
10
11
11
12
## What is an ember-cli-deploy plugin?
12
13
@@ -22,7 +23,7 @@ To get up and running quickly, do the following:
22
23
- Install this plugin
23
24
24
25
```bash
25
-
$ ember install ember-cli-deploy-revision-key
26
+
$ ember install ember-cli-deploy-revision-data
26
27
```
27
28
28
29
- Run the pipeline
@@ -35,34 +36,44 @@ $ ember deploy
35
36
Run the following command in your terminal:
36
37
37
38
```bash
38
-
ember install ember-cli-deploy-revision-key
39
+
ember install ember-cli-deploy-revision-data
39
40
```
40
41
41
42
## ember-cli-deploy Hooks Implemented
42
43
43
44
For detailed information on what plugin hooks are and how they work, please refer to the [Plugin Documentation][1].
44
45
45
46
-`configure`
46
-
-`didBuild`
47
+
-`prepare`
47
48
48
49
## Configuration Options
49
50
50
51
For detailed information on how configuration of plugins works, please refer to the [Plugin Documentation][1].
51
52
52
53
### type
53
54
54
-
The type of [Key Generator](#key-generators) to be used.
55
+
The type of [Data Generator](#data-generators) to be used.
Key generators are the strategies used to generate the unique revision key. Currently there is only one Key Generator implementation but we will add more as needed. Some examples of other potential key generators are `GitHash` or `DateTime` generators.
62
+
Data generators are the strategies used to generate information about the revision being deployed. A data generator must return an object which contains a property called `revisionKey` which uniquely identifies the current revision. A generator can add any other data that it deems relevant to the data object that it returns.
62
63
63
64
### File Hash generator
64
65
65
-
This key generator will fingerprint the `index.html` and return an MD5 hash. The generation of the revision key, using this generator, is guaranteed to be idempotent. That is, the same revision key will be generated for the same set of project files. If the project files change in any way, this will be reflected by a change in the revision key.
66
+
This generator contructs a revisionKey from the fingerprint of the `index.html` file.
67
+
68
+
#### Data fields returned
69
+
70
+
##### revisionKey
71
+
72
+
The unique identifier of this build based on the MD5 fingerprint of the `index.html` file. This key is guaranteed to be idempotent. That is, the same revision key will be generated for the same set of project files. If the project files change in any way, this will be reflected by a change in the revision key.
73
+
74
+
##### timestamp
75
+
76
+
The timestamp of the current deploy
66
77
67
78
#### Configuration Options
68
79
@@ -86,19 +97,41 @@ The list of built project files. This option should be relative to `distDir` and
86
97
87
98
### Git Tag Commit generator
88
99
89
-
Creates a key based on the most recent git tag and the currently checked-out commit. The tag is the tag identifier, followed by a `+` symbol, followed by the first 8 characters of the commit hash.
100
+
Constructs a revision key based on the most recent git tag and the currently checked-out commit.
101
+
102
+
#### Data fields returned
103
+
104
+
##### revisionKey
105
+
106
+
The unique identifier of this build based on the git tag, followed by a `+` symbol, followed by the first 8 characters of the current commit hash.
90
107
91
108
For example, if your most recent git tag is `v2.0.3`, and the current commit is `0993043d49f9e0[...]`, this generator will return a revision of `v2.0.3+0993043d`.
92
109
110
+
##### timestamp
111
+
112
+
The timestamp of the current deploy
113
+
93
114
### Version Commit generator
94
115
95
-
Similar to the Git Tag Commit generator, but uses the `package.json` version string instead of the git tag. The JSON file containing the version string can be configured with the `versionFile` option.
116
+
Similar to the Git Tag Commit generator but uses the `package.json` version string to construct the revision key instead of the git tag.
117
+
118
+
#### Data fields returned
119
+
120
+
##### revisionKey
121
+
122
+
The unique identifier of this build based on the version in the `package.json`, followed by a `+` symbol, followed by the first 8 characters of the current commit hash.
123
+
124
+
For example, if your package.json version is `v2.0.3`, and the current commit is `0993043d49f9e0[...]`, this generator will return a revision of `v2.0.3+0993043d`.
125
+
126
+
##### timestamp
127
+
128
+
The timestamp of the current deploy
96
129
97
130
#### Configuration Options
98
131
99
132
##### versionFile
100
133
101
-
The file containing your project's version number. Must be a JSON file with a top-level `version` key. Only used by the `version-commit` key generator.
134
+
The file containing your project's version number. Must be a JSON file with a top-level `version` key.
0 commit comments