1
1
# Releasing Rails
2
2
3
- In this document, we'll cover the steps necessary to release Rails. Each
4
- section contains steps to take during that time before the release. The times
5
- suggested in each header are just that: suggestions. However, they should
3
+ In this document, we'll cover the steps necessary to release Rails. Each
4
+ section contains steps to take during that time before the release. The times
5
+ suggested in each header are just that: suggestions. However, they should
6
6
really be considered as minimums.
7
7
8
8
## 10 Days before release
9
9
10
- Today is mostly coordination tasks. Here are the things you must do today:
10
+ Today is mostly coordination tasks. Here are the things you must do today:
11
11
12
- ### Is the CI green? If not, make it green. (See "Fixing the CI")
12
+ ### Is the CI green? If not, make it green. (See "Fixing the CI")
13
13
14
- Do not release with a Red CI. You can find the CI status here:
14
+ Do not release with a Red CI. You can find the CI status here:
15
15
16
16
```
17
17
http://travis-ci.org/rails/rails
18
18
```
19
19
20
- ### Is Sam Ruby happy? If not, make him happy.
20
+ ### Is Sam Ruby happy? If not, make him happy.
21
21
22
22
Sam Ruby keeps a [ test suite] ( https://github.com/rubys/awdwr ) that makes
23
23
sure the code samples in his book
24
24
([ Agile Web Development with Rails] ( https://pragprog.com/titles/rails5/agile-web-development-with-rails-5th-edition ) )
25
- all work. These are valuable system tests
26
- for Rails. You can check the status of these tests here:
25
+ all work. These are valuable system tests
26
+ for Rails. You can check the status of these tests here:
27
27
28
28
[ http://intertwingly.net/projects/dashboard.html ] ( http://intertwingly.net/projects/dashboard.html )
29
29
30
30
Do not release with Red AWDwR tests.
31
31
32
- ### Do we have any Git dependencies? If so, contact those authors.
32
+ ### Do we have any Git dependencies? If so, contact those authors.
33
33
34
34
Having Git dependencies indicates that we depend on unreleased code.
35
35
Obviously Rails cannot be released when it depends on unreleased code.
@@ -38,12 +38,12 @@ suits them.
38
38
39
39
### Contact the security team (either tenderlove or rafaelfranca)
40
40
41
- Let them know of your plans to release. There may be security issues to be
41
+ Let them know of your plans to release. There may be security issues to be
42
42
addressed, and that can impact your release date.
43
43
44
44
### Notify implementors.
45
45
46
- Ruby implementors have high stakes in making sure Rails works. Be kind and
46
+ Ruby implementors have high stakes in making sure Rails works. Be kind and
47
47
give them a heads up that Rails will be released soonish.
48
48
49
49
This is only required for major and minor releases, bugfix releases aren't a
@@ -60,18 +60,18 @@ Implementors will love you and help you.
60
60
61
61
## 3 Days before release
62
62
63
- This is when you should release the release candidate. Here are your tasks
63
+ This is when you should release the release candidate. Here are your tasks
64
64
for today:
65
65
66
- ### Is the CI green? If not, make it green.
66
+ ### Is the CI green? If not, make it green.
67
67
68
- ### Is Sam Ruby happy? If not, make him happy.
68
+ ### Is Sam Ruby happy? If not, make him happy.
69
69
70
- ### Contact the security team. CVE emails must be sent on this day.
70
+ ### Contact the security team. CVE emails must be sent on this day.
71
71
72
72
### Create a release branch.
73
73
74
- From the stable branch, create a release branch. For example, if you're
74
+ From the stable branch, create a release branch. For example, if you're
75
75
releasing Rails 3.0.10, do this:
76
76
77
77
```
@@ -82,7 +82,7 @@ Switched to a new branch '3-0-10'
82
82
83
83
### Update each CHANGELOG.
84
84
85
- Many times commits are made without the CHANGELOG being updated. You should
85
+ Many times commits are made without the CHANGELOG being updated. You should
86
86
review the commits since the last release, and fill in any missing information
87
87
for each CHANGELOG.
88
88
@@ -96,15 +96,15 @@ If you're doing a stable branch release, you should also ensure that all of
96
96
the CHANGELOG entries in the stable branch are also synced to the master
97
97
branch.
98
98
99
- ### Update the RAILS_VERSION file to include the RC .
99
+ ### Put the new version in the RAILS_VERSION file .
100
100
101
- ### Build and test the gem .
101
+ Include an RC number if appropriate, e.g. ` 6.0.0.rc1 ` .
102
102
103
- Run ` rake install ` to generate the gems and install them locally. Then try
104
- generating a new app and ensure that nothing explodes.
103
+ ### Build and test the gem.
105
104
106
- Verify that Action Cable and Action View's package.json files are updated with
107
- the RC version.
105
+ Run ` rake verify ` to generate the gems and install them locally. ` verify ` also
106
+ generates a Rails app with a migration and boots it to smoke test with in your
107
+ browser.
108
108
109
109
This will stop you from looking silly when you push an RC to rubygems.org and
110
110
then realize it is broken.
@@ -117,37 +117,39 @@ as NPM packages, so you must have Node.js installed, have an NPM account
117
117
check this via ` npm owner ls actioncable ` and ` npm owner ls rails-ujs ` ) in
118
118
order to do a full release. Do not release until you're set up with NPM!
119
119
120
+ The release task will sign the release tag. If you haven't got commit signing
121
+ set up, use https://git-scm.com/book/tr/v2/Git-Tools-Signing-Your-Work as a
122
+ guide. You can generate keys with the GPG suite from here: https://gpgtools.org .
123
+
124
+ Run ` rake changelog:header ` to put a header with the new version in every
125
+ CHANGELOG. Don't commit this, the release task handles it.
126
+
120
127
Run ` rake release ` . This will populate the gemspecs and NPM package.json with
121
128
the current RAILS_VERSION, commit the changes, tag it, and push the gems to
122
129
rubygems.org.
123
130
124
- Here are the commands that ` rake release ` uses so you can understand what to do
125
- in case anything goes wrong:
126
-
127
- ```
128
- $ rake all:build
129
- $ git commit -am'updating RAILS_VERSION'
130
- $ git tag -m 'v3.0.10.rc1 release' v3.0.10.rc1
131
- $ git push
132
- $ git push --tags
133
- $ for i in $(ls pkg); do gem push $i; npm publish; done
134
- ```
135
-
136
131
### Send Rails release announcements
137
132
138
133
Write a release announcement that includes the version, changes, and links to
139
- GitHub where people can find the specific commit list. Here are the mailing
134
+ GitHub where people can find the specific commit list. Here are the mailing
140
135
lists where you should announce:
141
136
142
137
143
138
144
139
145
140
146
- Use Markdown format for your announcement. Remember to ask people to report
141
+ Use Markdown format for your announcement. Remember to ask people to report
147
142
issues with the release candidate to the rails-core mailing list.
148
143
144
+ NOTE: For patch releases there's a ` rake announce ` task to generate the release
145
+ post. It supports multiple patch releases too:
146
+
147
+ ```
148
+ VERSIONS="5.0.5.rc1,5.1.3.rc1" rake announce
149
+ ```
150
+
149
151
IMPORTANT: If any users experience regressions when using the release
150
- candidate, you * must* postpone the release. Bugfix releases * should not*
152
+ candidate, you * must* postpone the release. Bugfix releases * should not*
151
153
break existing applications.
152
154
153
155
### Post the announcement to the Rails blog.
@@ -165,12 +167,12 @@ Check the rails-core mailing list and the GitHub issue list for regressions in
165
167
the RC.
166
168
167
169
If any regressions are found, fix the regressions and repeat the release
168
- candidate process. We will not release the final until 72 hours after the
169
- last release candidate has been pushed. This means that if users find
170
+ candidate process. We will not release the final until 72 hours after the
171
+ last release candidate has been pushed. This means that if users find
170
172
regressions, the scheduled release date must be postponed.
171
173
172
- When you fix the regressions, do not create a new branch. Fix them on the
173
- stable branch, then cherry pick the commit to your release branch. No other
174
+ When you fix the regressions, do not create a new branch. Fix them on the
175
+ stable branch, then cherry pick the commit to your release branch. No other
174
176
commits should be added to the release branch besides regression fixing commits.
175
177
176
178
## Day of release
@@ -203,7 +205,7 @@ Email the security reports to:
203
205
204
206
205
207
Be sure to note the security fixes in your announcement along with CVE numbers
206
- and links to each patch. Some people may not be able to upgrade right away,
208
+ and links to each patch. Some people may not be able to upgrade right away,
207
209
so we need to give them the security fixes in patch form.
208
210
209
211
* Blog announcements
0 commit comments