UNPKG

8.28 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 unmerged 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 ballbark 230K as of `3.0.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* if normal release
174 * run `./dev/add-to-output-repos.sh`
175* if incremental beta release
176 * run `./dev/add-to-output-repos.sh beta`
177* if promoting canary to beta
178 * run `./dev/add-to-output-repos.sh beta fork`
179* copy the [`ember new` diff] and [`ember addon` diff] lines from the previous
180 release changelog and paste into the current, then update the url with the
181 newer tags
182
183### Publish
184
185If everything went well, publish. Please note, we must have an extremely low
186tolerance for quirks and failures. We do not want our users to endure any extra
187pain.
188
1891. go back to ember-cli directory
190* `git add` the modified `package.json` and `CHANGELOG.md`
191* Commit the changes `git commit -m "Release vx.y.z"` and push `git push`
192* `git tag "vx.y.z"`
193* `git push origin <vx.y.z>`
194* publish to npm
195 * if normal release
196 * `npm publish ./ember-cli-<version>.tgz`
197 * if beta release
198 * `npm publish ./ember-cli-<version>.tgz --tag beta`
199
200
201### Test Again
202
203Test published version
204
2051. `npm uninstall -g ember-cli`
206* `npm cache clear`
207* install
208 * if normal release
209 * `npm install -g ember-cli`
210 * if beta release
211 * `npm install -g ember-cli@beta`
212* ensure version is as expected `ember version`
213* ensure new project generates
214* ensure old project upgrades nicely
215
216
217## Promote
218
219Announce release!
220
221### Create a new release on GitHub
222
223* [Draft a new release.](https://github.com/ember-cli/ember-cli/releases/new)
224 * enter the new version number as the tag prefixed with `v` e.g. (`v0.1.12`)
225 * Make sure to include the links for diffs between the versions.
226 * for release title choose a great name, no pressure
227 * in the description paste the following upgrade instructions
228
229```
230## Setup
231
232`npm install -g ember-cli@NEW_VERSION_NUMBER` -- Install new global ember-cli
233
234## Project Update
235
2361. `rm -rf node_modules dist tmp` -- Delete temporary development folders.
2372. `npm install -g ember-cli-update` -- Install Ember CLI update tool globally.
2383. 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.
2394. 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.
240
241## Changelog
242
243INSERT_CHANGELOG_HERE
244```
245
246 * Fill in the version number for `NEW_VERSION_NUMBER`
247 * Replace `INSERT_CHANGELOG_HERE` with the new content from `CHANGELOG.md`
248 * Attach the `ember-cli-<version>.tgz` from above
249 * Check the "Pre-release" checkbox for beta releases.
250 * Publish the release.
251
252### Twitter
253
254> Ember CLI vX.Y.Z "Release name goes here." released!
255https://github.com/ember-cli/ember-cli/releases/tag/vX.Y.Z
256\#emberjs
257
258### Discord
259
260Grab a link to your tweet and post in:
261* [#news-and-announcements](https://discordapp.com/channels/480462759797063690/480499624663056390)
262* [#dev-ember-cli](https://discordapp.com/channels/480462759797063690/480501885837770763)
263* [#ember-cli](https://discordapp.com/channels/480462759797063690/486548111221719040)
264
265
266## Troubleshooting
267
268* if a few mins after release you notice an issue, you can unpublish
269 * `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`)
270* 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