UNPKG

7.95 kBMarkdownView Raw
1# Release Process
2
3Although not very tricky, it is quite easy to deploy something that doesn't
4quite work as expected. The following steps help you navigate through some of
5the release gotchas and will hopefully result in a successful release.
6
7---
8
9## Preparation
10
11### Communication
12
13- Ensure that homu isn't presently processing any PRs.
14- Post a note in [#dev-ember-cli](https://discordapp.com/channels/480462759797063690/480501885837770763) letting us know you're doing a release.
15
16> I'm starting an Ember CLI release. Please hold off merging PRs and pushing new code!
17
18### Environment
19
20Make sure that you're running the most recent stable `node` and bundled `npm`.
21
22```sh
23node --version
24npm --version
25```
26
27## Branching
28
29If you're planning to release a stable/bugfix version _and_ a beta, make sure to release the beta _after_ the stable version.
30
31```sh
32# Fetch changes from GitHub
33git fetch origin
34```
35
36Once you're done following these instructions make sure that you push your `master`, `beta`, and `release` branches back to GitHub.
37
38
39### Promoting beta to stable
40
41Follow these steps if you're releasing a new minor or major version (e.g. from `v2.5.0` to `v2.6.0`):
42
43```sh
44# Switch to "release" branch and reset it to "origin/beta"
45git checkout -B release --track origin/beta
46
47# Merge any unreleased changes from "origin/release" back in
48git merge origin/release
49
50# ... do the stable release ...
51
52# Switch to "beta" branch and reset it to "origin/beta"
53git checkout -B beta --track origin/beta
54
55# Merge the new stable release into the "beta" branch
56git merge vX.Y.0
57```
58
59### Stable bugfix release
60
61Follow these steps if you're releasing a bugfix for a stable version (e.g. from `v2.5.0` to `v2.5.1`)
62
63```sh
64# Switch to "release" branch and reset it to "origin/release"
65git checkout -B release --track origin/release
66
67# ... do the stable release ...
68
69# Switch to "beta" branch and reset it to "origin/beta"
70git checkout -B beta --track origin/beta
71
72# Merge the new stable release into the "beta" branch
73git merge vX.Y.Z
74```
75
76
77### Promoting canary to beta
78
79Follow these steps if you're releasing a beta version after a new minor/major release (e.g. `v2.7.0-beta.1`)
80
81```sh
82# Switch to "beta" branch and reset it to "origin/master"
83git checkout -B beta --track origin/master
84
85# Merge any unmerged changes from "origin/beta" back in
86git merge origin/beta
87
88# ... do the beta release ...
89
90# Switch to "master" branch and reset it to "origin/master"
91git checkout -B master --track origin/master
92
93# Merge the new beta release into the "master" branch
94git merge vX.Y.0-beta.1
95
96# Push back upstream.
97git push origin
98```
99
100
101### Incremental beta release
102
103Follow these steps if you're releasing a beta version following another beta (e.g. `v2.7.0-beta.N` with `N != 1`)
104
105```sh
106# Switch to "beta" branch and reset it to "origin/beta"
107git checkout -B beta --track origin/beta
108
109# ... do the beta release ...
110
111# Switch to "master" branch and reset it to "origin/master"
112git checkout -B master --track origin/master
113
114# Merge the new beta release into the "master" branch
115git merge vX.Y.0-beta.N
116```
117
118## Release
119
120### Setup
121
122* Update Ember and Ember Data versions.
123 * `blueprints/app/files/package.json`
124 * if you're releasing a new minor or major version:
125 * `tests/fixtures/addon/npm/package.json`
126 * `tests/fixtures/addon/yarn/package.json`
127 * `tests/fixtures/app/npm/package.json`
128 * `tests/fixtures/app/yarn/package.json`
129* generate changelog
130 * if on master branch
131 * run `./dev/changelog`
132 * if this is a beta
133 * run `./dev/changelog beta`
134 * if this is a release
135 * run `./dev/changelog release`
136* prepend changelog output to `CHANGELOG.md`
137* edit changelog output to be as user-friendly as possible (drop [INTERNAL] changes, non-code changes, etc.)
138* replace any "ember-cli" user references in the changelog to whomever made the change
139* bump `package.json` version
140* don't commit these changes until later
141* run `./dev/prepare-release`
142* the `du` command should give you ballpark 190K as of `3.8.0`
143
144### Test
145
146* `cd to/someplace/to/test/`
147* ensure `ember version` is the newly packaged version
148
149```shell
150# ensure new project generation works
151ember new --skip-npm my-cool-test-project
152cd my-cool-test-project
153
154# link your local ember-cli
155npm link ember-cli
156
157# install other deps
158npm install
159
160# test the server
161ember serve
162```
163
164* test other things like generators and live-reload
165* generate an http mock `ember g http-mock my-http-mock`
166* test upgrades of other apps
167* if releasing using Windows, check that it works on a Linux VM
168 * we are checking if any Windows line endings snuck in, because they won't work on Unix
169* if releasing using Unix, you are set, Windows can read your line endings
170
171### Update Artifacts
172
173* run `node ./dev/update-output-repos.js`
174
175### Publish
176
177If everything went well, publish. Please note, we must have an extremely low
178tolerance for quirks and failures. We do not want our users to endure any extra
179pain.
180
1811. go back to ember-cli directory
182* `git add` the modified `package.json` and `CHANGELOG.md`
183* Commit the changes `git commit -m "Release vx.y.z"` and push `git push`
184* `git tag "vx.y.z"`
185* `git push origin <vx.y.z>`
186* publish to npm
187 * if normal release
188 * `npm publish ./ember-cli-<version>.tgz`
189 * if beta release
190 * `npm publish ./ember-cli-<version>.tgz --tag beta`
191
192
193### Test Again
194
195Test published version
196
1971. `npm uninstall -g ember-cli`
198* `npm cache clear`
199* install
200 * if normal release
201 * `npm install -g ember-cli`
202 * if beta release
203 * `npm install -g ember-cli@beta`
204* ensure version is as expected `ember version`
205* ensure new project generates
206* ensure old project upgrades nicely
207
208
209## Promote
210
211Announce release!
212
213### Create a new release on GitHub
214
215* [Draft a new release.](https://github.com/ember-cli/ember-cli/releases/new)
216 * enter the new version number as the tag prefixed with `v` e.g. (`v0.1.12`)
217 * Make sure to include the links for diffs between the versions.
218 * for release title choose a great name, no pressure
219 * in the description paste the following upgrade instructions
220
221```
222## Setup
223
224`npm install -g ember-cli@NEW_VERSION_NUMBER` -- Install new global ember-cli
225
226## Project Update
227
2281. `rm -rf node_modules dist tmp` -- Delete temporary development folders.
2292. `npm install -g ember-cli-update` -- Install Ember CLI update tool globally.
2303. Run `ember-cli-update --to NEW_VERSION_NUMBER` -- This will update your app or addon to the latest ember-cli release. You will probably encounter merge conflicts that you should resolve in your normal git workflow.
2314. Run `ember-cli-update --run-codemods` -- This will let you pick codemods to run against your project, to ensure you are using the latest patterns and platform features.
232
233## Changelog
234
235INSERT_CHANGELOG_HERE
236```
237
238 * Fill in the version number for `NEW_VERSION_NUMBER`
239 * Replace `INSERT_CHANGELOG_HERE` with the new content from `CHANGELOG.md`
240 * Attach the `ember-cli-<version>.tgz` from above
241 * Check the "Pre-release" checkbox for beta releases.
242 * Publish the release.
243
244### Twitter
245
246> Ember CLI vX.Y.Z "Release name goes here." released!
247https://github.com/ember-cli/ember-cli/releases/tag/vX.Y.Z
248\#emberjs
249
250### Discord
251
252Grab a link to your tweet and post in:
253* [#news-and-announcements](https://discordapp.com/channels/480462759797063690/480499624663056390)
254* [#dev-ember-cli](https://discordapp.com/channels/480462759797063690/480501885837770763)
255* [#ember-cli](https://discordapp.com/channels/480462759797063690/486548111221719040)
256
257
258## Troubleshooting
259
260* if a few mins after release you notice an issue, you can unpublish
261 * `npm unpublish ember-cli@<version>` (`npm unpublish` is write-only, that is you can unpublish but cannot push `ember-cli` with the same version, you have to bump `version` in `package.json`)
262* if it is completely broken, feel free to unpublish a few hours later or the next morning, even if you don't have time to immediately rerelease