2015-08-15 13:21:46 +00:00
|
|
|
# Releasing Rails
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
In this document, we'll cover the steps necessary to release Rails. Each
|
|
|
|
section contains steps to take during that time before the release. The times
|
|
|
|
suggested in each header are just that: suggestions. However, they should
|
|
|
|
really be considered as minimums.
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
## 10 Days before release
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
Today is mostly coordination tasks. Here are the things you must do today:
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Is the CI green? If not, make it green. (See "Fixing the CI")
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
Do not release with a Red CI. You can find the CI status here:
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
```
|
|
|
|
http://travis-ci.org/rails/rails
|
|
|
|
```
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Is Sam Ruby happy? If not, make him happy.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2016-02-04 17:59:28 +00:00
|
|
|
Sam Ruby keeps a [test suite](https://github.com/rubys/awdwr) that makes
|
2016-05-31 08:01:13 +00:00
|
|
|
sure the code samples in his book
|
2016-04-28 00:20:12 +00:00
|
|
|
([Agile Web Development with Rails](https://pragprog.com/titles/rails5/agile-web-development-with-rails-5th-edition))
|
2016-02-04 17:59:28 +00:00
|
|
|
all work. These are valuable system tests
|
|
|
|
for Rails. You can check the status of these tests here:
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2016-02-04 17:59:28 +00:00
|
|
|
[http://intertwingly.net/projects/dashboard.html](http://intertwingly.net/projects/dashboard.html)
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
Do not release with Red AWDwR tests.
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Do we have any Git dependencies? If so, contact those authors.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2012-08-11 06:19:51 +00:00
|
|
|
Having Git dependencies indicates that we depend on unreleased code.
|
|
|
|
Obviously Rails cannot be released when it depends on unreleased code.
|
2011-08-04 18:27:26 +00:00
|
|
|
Contact the authors of those particular gems and work out a release date that
|
2011-08-13 00:23:16 +00:00
|
|
|
suits them.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2016-02-12 13:36:45 +00:00
|
|
|
### Contact the security team (either tenderlove or rafaelfranca)
|
2011-08-04 21:15:45 +00:00
|
|
|
|
|
|
|
Let them know of your plans to release. There may be security issues to be
|
|
|
|
addressed, and that can impact your release date.
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Notify implementors.
|
2011-08-04 21:15:45 +00:00
|
|
|
|
|
|
|
Ruby implementors have high stakes in making sure Rails works. Be kind and
|
|
|
|
give them a heads up that Rails will be released soonish.
|
|
|
|
|
2014-12-15 01:11:11 +00:00
|
|
|
This is only required for major and minor releases, bugfix releases aren't a
|
2016-05-31 08:01:13 +00:00
|
|
|
big enough deal, and are supposed to be backward compatible.
|
2013-02-01 19:16:28 +00:00
|
|
|
|
2011-08-04 21:15:45 +00:00
|
|
|
Send an email just giving a heads up about the upcoming release to these
|
|
|
|
lists:
|
|
|
|
|
|
|
|
* team@jruby.org
|
|
|
|
* community@rubini.us
|
|
|
|
* rubyonrails-core@googlegroups.com
|
|
|
|
|
|
|
|
Implementors will love you and help you.
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### 3 Days before release
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
This is when you should release the release candidate. Here are your tasks
|
|
|
|
for today:
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Is the CI green? If not, make it green.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Is Sam Ruby happy? If not, make him happy.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Contact the security team. CVE emails must be sent on this day.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Create a release branch.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
From the stable branch, create a release branch. For example, if you're
|
|
|
|
releasing Rails 3.0.10, do this:
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
```
|
|
|
|
[aaron@higgins rails (3-0-stable)]$ git checkout -b 3-0-10
|
|
|
|
Switched to a new branch '3-0-10'
|
|
|
|
[aaron@higgins rails (3-0-10)]$
|
|
|
|
```
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Update each CHANGELOG.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
Many times commits are made without the CHANGELOG being updated. You should
|
|
|
|
review the commits since the last release, and fill in any missing information
|
|
|
|
for each CHANGELOG.
|
|
|
|
|
|
|
|
You can review the commits for the 3.0.10 release like this:
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
```
|
|
|
|
[aaron@higgins rails (3-0-10)]$ git log v3.0.9..
|
|
|
|
```
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2011-11-14 11:29:57 +00:00
|
|
|
If you're doing a stable branch release, you should also ensure that all of
|
|
|
|
the CHANGELOG entries in the stable branch are also synced to the master
|
|
|
|
branch.
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Update the RAILS_VERSION file to include the RC.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Build and test the gem.
|
2011-11-14 17:08:24 +00:00
|
|
|
|
|
|
|
Run `rake install` to generate the gems and install them locally. Then try
|
|
|
|
generating a new app and ensure that nothing explodes.
|
|
|
|
|
2016-11-26 15:47:07 +00:00
|
|
|
Verify that Action Cable and Action View's package.json files are updated with
|
|
|
|
the RC version.
|
2016-05-07 14:41:23 +00:00
|
|
|
|
2011-11-18 19:22:18 +00:00
|
|
|
This will stop you from looking silly when you push an RC to rubygems.org and
|
2015-05-13 20:03:43 +00:00
|
|
|
then realize it is broken.
|
2011-11-14 17:08:24 +00:00
|
|
|
|
2016-05-07 14:41:23 +00:00
|
|
|
### Release to RubyGems and NPM.
|
|
|
|
|
2016-11-26 15:47:07 +00:00
|
|
|
IMPORTANT: The Action Cable client and Action View's UJS adapter are released
|
|
|
|
as NPM packages, so you must have Node.js installed, have an NPM account
|
|
|
|
(npmjs.com), and be a package owner for `actioncable` and `rails-ujs` (you can
|
|
|
|
check this via `npm owner ls actioncable` and `npm owner ls rails-ujs`) in
|
|
|
|
order to do a full release. Do not release until you're set up with NPM!
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2016-05-07 14:41:23 +00:00
|
|
|
Run `rake release`. This will populate the gemspecs and NPM package.json with
|
|
|
|
the current RAILS_VERSION, commit the changes, tag it, and push the gems to
|
|
|
|
rubygems.org.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2016-05-07 14:41:23 +00:00
|
|
|
Here are the commands that `rake release` uses so you can understand what to do
|
|
|
|
in case anything goes wrong:
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
```
|
|
|
|
$ rake all:build
|
|
|
|
$ git commit -am'updating RAILS_VERSION'
|
|
|
|
$ git tag -m 'v3.0.10.rc1 release' v3.0.10.rc1
|
|
|
|
$ git push
|
|
|
|
$ git push --tags
|
2016-05-07 14:41:23 +00:00
|
|
|
$ for i in $(ls pkg); do gem push $i; npm publish; done
|
2015-08-15 13:21:46 +00:00
|
|
|
```
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Send Rails release announcements
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
Write a release announcement that includes the version, changes, and links to
|
2012-08-11 06:19:51 +00:00
|
|
|
GitHub where people can find the specific commit list. Here are the mailing
|
2011-08-04 18:27:26 +00:00
|
|
|
lists where you should announce:
|
|
|
|
|
|
|
|
* rubyonrails-core@googlegroups.com
|
|
|
|
* rubyonrails-talk@googlegroups.com
|
|
|
|
* ruby-talk@ruby-lang.org
|
|
|
|
|
2012-08-11 06:19:51 +00:00
|
|
|
Use Markdown format for your announcement. Remember to ask people to report
|
2011-08-04 18:27:26 +00:00
|
|
|
issues with the release candidate to the rails-core mailing list.
|
|
|
|
|
2011-08-04 19:00:06 +00:00
|
|
|
IMPORTANT: If any users experience regressions when using the release
|
2011-08-04 18:27:26 +00:00
|
|
|
candidate, you *must* postpone the release. Bugfix releases *should not*
|
|
|
|
break existing applications.
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Post the announcement to the Rails blog.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2016-05-31 08:01:13 +00:00
|
|
|
If you used Markdown format for your email, you can just paste it into the
|
2011-08-04 18:27:26 +00:00
|
|
|
blog.
|
|
|
|
|
|
|
|
* http://weblog.rubyonrails.org
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Post the announcement to the Rails Twitter account.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
## Time between release candidate and actual release
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2012-08-11 06:19:51 +00:00
|
|
|
Check the rails-core mailing list and the GitHub issue list for regressions in
|
2011-08-04 18:27:26 +00:00
|
|
|
the RC.
|
|
|
|
|
|
|
|
If any regressions are found, fix the regressions and repeat the release
|
|
|
|
candidate process. We will not release the final until 72 hours after the
|
|
|
|
last release candidate has been pushed. This means that if users find
|
|
|
|
regressions, the scheduled release date must be postponed.
|
|
|
|
|
|
|
|
When you fix the regressions, do not create a new branch. Fix them on the
|
|
|
|
stable branch, then cherry pick the commit to your release branch. No other
|
|
|
|
commits should be added to the release branch besides regression fixing commits.
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
## Day of release
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
Many of these steps are the same as for the release candidate, so if you need
|
2014-04-02 04:31:52 +00:00
|
|
|
more explanation on a particular step, see the RC steps.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2011-08-17 00:39:58 +00:00
|
|
|
Today, do this stuff in this order:
|
|
|
|
|
|
|
|
* Apply security patches to the release branch
|
2016-11-21 19:38:03 +00:00
|
|
|
* Update CHANGELOG with security fixes
|
2011-08-17 00:39:58 +00:00
|
|
|
* Update RAILS_VERSION to remove the rc
|
2011-11-14 17:08:24 +00:00
|
|
|
* Build and test the gem
|
2011-08-17 00:39:58 +00:00
|
|
|
* Release the gems
|
2012-12-06 12:19:37 +00:00
|
|
|
* If releasing a new stable version:
|
|
|
|
- Trigger stable docs generation (see below)
|
|
|
|
- Update the version in the home page
|
2011-08-17 00:39:58 +00:00
|
|
|
* Email security lists
|
|
|
|
* Email general announcement lists
|
2011-08-16 23:30:29 +00:00
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Emailing the Rails security announce list
|
2011-08-16 23:30:29 +00:00
|
|
|
|
2011-08-17 00:39:58 +00:00
|
|
|
Email the security announce list once for each vulnerability fixed.
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
You can do this, or ask the security team to do it.
|
|
|
|
|
2011-08-17 00:39:58 +00:00
|
|
|
Email the security reports to:
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2011-08-17 00:39:58 +00:00
|
|
|
* rubyonrails-security@googlegroups.com
|
2012-06-12 21:34:44 +00:00
|
|
|
* oss-security@lists.openwall.com
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
Be sure to note the security fixes in your announcement along with CVE numbers
|
|
|
|
and links to each patch. Some people may not be able to upgrade right away,
|
|
|
|
so we need to give them the security fixes in patch form.
|
|
|
|
|
|
|
|
* Blog announcements
|
|
|
|
* Twitter announcements
|
2016-11-21 19:38:03 +00:00
|
|
|
* Merge the release branch to the stable branch
|
2011-08-04 18:27:26 +00:00
|
|
|
* Drink beer (or other cocktail)
|
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
## Misc
|
2011-08-04 18:27:26 +00:00
|
|
|
|
2015-08-15 13:21:46 +00:00
|
|
|
### Fixing the CI
|
2011-08-04 18:27:26 +00:00
|
|
|
|
|
|
|
There are two simple steps for fixing the CI:
|
|
|
|
|
|
|
|
1. Identify the problem
|
|
|
|
2. Fix it
|
|
|
|
|
2016-02-04 17:59:28 +00:00
|
|
|
Repeat these steps until the CI is green.
|