Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 239 lines (154 sloc) 7.72 kB
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
1 = Releasing Rails
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
6 really be considered as minimums.
7
8 == 10 Days before release
9
10 Today is mostly coordination tasks. Here are the things you must do today:
11
12 === Is the CI green? If not, make it green. (See "Fixing the CI")
13
14 Do not release with a Red CI. You can find the CI status here:
15
16 http://travis-ci.org/#!/rails/rails
17
18 === Is Sam Ruby happy? If not, make him happy.
19
20 Sam Ruby keeps a test suite that makes sure the code samples in his book (Agile
21 Web Development with Rails) all work. These are valuable integration tests
22 for Rails. You can check the status of his tests here:
23
24 http://intertwingly.net/projects/dashboard.html
25
26 Do not release with Red AWDwR tests.
27
4d8081b @jonleighton Add note about checking postgres tests before release
jonleighton authored
28 === Are the postgres tests green? If not, make them green
29
30 Currently Travis CI doesn't run the Active Record postgres tests. They are
31 working to resolve this, but in the mean time, it is crucial to ensure that
32 the tests are still green before release.
33
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
34 === Do we have any git dependencies? If so, contact those authors.
35
36 Having git dependencies indicates that we depend on unreleased code.
37 Obviously rails cannot be released when it depends on unreleased code.
38 Contact the authors of those particular gems and work out a release date that
f566fb3 @waynn "suits" is correct here, not "suites"
waynn authored
39 suits them.
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
40
5399b20 @tenderlove moving CI and Sam Ruby to the top of the list. I :heart: CI and Sam
tenderlove authored
41 === Contact the security team (either Koz or tenderlove)
42
43 Let them know of your plans to release. There may be security issues to be
44 addressed, and that can impact your release date.
45
46 === Notify implementors.
47
48 Ruby implementors have high stakes in making sure Rails works. Be kind and
49 give them a heads up that Rails will be released soonish.
50
51 Send an email just giving a heads up about the upcoming release to these
52 lists:
53
54 * team@jruby.org
55 * community@rubini.us
56 * rubyonrails-core@googlegroups.com
57
58 Implementors will love you and help you.
59
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
60 == 3 Days before release
61
62 This is when you should release the release candidate. Here are your tasks
63 for today:
64
65 === Is the CI green? If not, make it green.
66
67 === Is Sam Ruby happy? If not, make him happy.
68
4d8081b @jonleighton Add note about checking postgres tests before release
jonleighton authored
69 === Are the postgres tests green? If not, make them green
70
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
71 === Contact the security team. CVE emails must be sent on this day.
72
73 === Create a release branch.
74
75 From the stable branch, create a release branch. For example, if you're
76 releasing Rails 3.0.10, do this:
77
78 [aaron@higgins rails (3-0-stable)]$ git checkout -b 3-0-10
79 Switched to a new branch '3-0-10'
80 [aaron@higgins rails (3-0-10)]$
81
82 === Update each CHANGELOG.
83
84 Many times commits are made without the CHANGELOG being updated. You should
85 review the commits since the last release, and fill in any missing information
86 for each CHANGELOG.
87
88 You can review the commits for the 3.0.10 release like this:
89
90 [aaron@higgins rails (3-0-10)]$ git log v3.0.9..
91
c7b8468 @jonleighton Add note about syncing CHANGELOGs
jonleighton authored
92 If you're doing a stable branch release, you should also ensure that all of
93 the CHANGELOG entries in the stable branch are also synced to the master
94 branch.
95
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
96 === Update the RAILS_VERSION file to include the RC.
97
be777b3 @jonleighton Add a note to REALEASING_RAILS about testing the gem locally before r…
jonleighton authored
98 === Build and test the gem.
99
100 Run `rake install` to generate the gems and install them locally. Then try
101 generating a new app and ensure that nothing explodes.
102
6fc2e12 @htanata Some fixes on RELEASING_RAILS.rdoc.
htanata authored
103 This will stop you from looking silly when you push an RC to rubygems.org and
104 then realise it is broken.
be777b3 @jonleighton Add a note to REALEASING_RAILS about testing the gem locally before r…
jonleighton authored
105
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
106 === Release the gem.
107
108 IMPORTANT: Due to YAML parse problems on the rubygems.org server, it is safest
109 to use Ruby 1.8 when releasing.
110
111 Run `rake release`. This will populate the gemspecs with data from
112 RAILS_VERSION, commit the changes, tag it, and push the gems to rubygems.org.
113 Here are the commands that `rake release` should use, so you can understand
114 what to do in case anything goes wrong:
115
116 $ rake all:build
117 $ git commit -am'updating RAILS_VERSION'
118 $ git tag -m'tagging rc release' v3.0.10.rc1
5852fcf @spastorino Add git push and git push --tags to RELEASING_RAILS.rdoc
spastorino authored
119 $ git push
120 $ git push --tags
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
121 $ for i in $(ls dist); do gem push $i; done
122
123 === Send Rails release announcements
124
125 Write a release announcement that includes the version, changes, and links to
126 github where people can find the specific commit list. Here are the mailing
127 lists where you should announce:
128
129 * rubyonrails-core@googlegroups.com
130 * rubyonrails-talk@googlegroups.com
131 * ruby-talk@ruby-lang.org
132
133 Use markdown format for your announcement. Remember to ask people to report
134 issues with the release candidate to the rails-core mailing list.
135
886d011 @tenderlove fixing wrong words. thanks @jbrown
tenderlove authored
136 IMPORTANT: If any users experience regressions when using the release
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
137 candidate, you *must* postpone the release. Bugfix releases *should not*
138 break existing applications.
139
140 === Post the announcement to the Rails blog.
141
142 If you used markdown format for your email, you can just paste it in to the
143 blog.
144
145 * http://weblog.rubyonrails.org
146
147 === Post the announcement to the Rails twitter account.
148
149 == Time between release candidate and actual release
150
151 Check the rails-core mailing list and the github issue list for regressions in
152 the RC.
153
154 If any regressions are found, fix the regressions and repeat the release
155 candidate process. We will not release the final until 72 hours after the
156 last release candidate has been pushed. This means that if users find
157 regressions, the scheduled release date must be postponed.
158
159 When you fix the regressions, do not create a new branch. Fix them on the
160 stable branch, then cherry pick the commit to your release branch. No other
161 commits should be added to the release branch besides regression fixing commits.
162
163 == Day of release
164
165 Many of these steps are the same as for the release candidate, so if you need
166 more explanation on a particular step, so the RC steps.
167
22e611e @tenderlove making the order more clear, adding linux distros mailing lists to ou…
tenderlove authored
168 Today, do this stuff in this order:
169
170 * Apply security patches to the release branch
171 * Update CHANGELOG with security fixes.
172 * Update RAILS_VERSION to remove the rc
be777b3 @jonleighton Add a note to REALEASING_RAILS about testing the gem locally before r…
jonleighton authored
173 * Build and test the gem
22e611e @tenderlove making the order more clear, adding linux distros mailing lists to ou…
tenderlove authored
174 * Release the gems
175 * Email security lists
176 * Email general announcement lists
9d9f591 @tenderlove adding lessons learned so I do not make the same mistake twice
tenderlove authored
177
22e611e @tenderlove making the order more clear, adding linux distros mailing lists to ou…
tenderlove authored
178 === Emailing the rails security announce list
9d9f591 @tenderlove adding lessons learned so I do not make the same mistake twice
tenderlove authored
179
22e611e @tenderlove making the order more clear, adding linux distros mailing lists to ou…
tenderlove authored
180 Email the security announce list once for each vulnerability fixed.
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
181
182 You can do this, or ask the security team to do it.
183
22e611e @tenderlove making the order more clear, adding linux distros mailing lists to ou…
tenderlove authored
184 Email the security reports to:
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
185
22e611e @tenderlove making the order more clear, adding linux distros mailing lists to ou…
tenderlove authored
186 * rubyonrails-security@googlegroups.com
187 * linux-distros@vs.openwall.org
6b80917 @tenderlove adding my brain dump of the release process
tenderlove authored
188
189 Be sure to note the security fixes in your announcement along with CVE numbers
190 and links to each patch. Some people may not be able to upgrade right away,
191 so we need to give them the security fixes in patch form.
192
193 * Blog announcements
194 * Twitter announcements
195 * Merge the release branch to the stable branch.
196 * Drink beer (or other cocktail)
197
198 == Misc
199
200 === Fixing the CI
201
202 There are two simple steps for fixing the CI:
203
204 1. Identify the problem
205 2. Fix it
206
207 Repeat these steps until the CI is green.
307fc12 @fxn release instructions: new section about docs generation
fxn authored
208
209 === Manually trigger docs generation
210
211 We have a post-receive hook in GitHub that calls the docs server on pushes.
6fc2e12 @htanata Some fixes on RELEASING_RAILS.rdoc.
htanata authored
212 It triggers generation and publication of edge docs, updates the contrib app,
307fc12 @fxn release instructions: new section about docs generation
fxn authored
213 and generates and publishes stable docs if a new stable tag is detected.
214
215 The hook unfortunately is not invoked by tag pushing, so once the new stable
216 tag has been pushed to origin, please run
217
c2aadf8 @fxn updates the host and port of publish_docs, and changes the release in…
fxn authored
218 rake publish_docs
307fc12 @fxn release instructions: new section about docs generation
fxn authored
219
220 You should see something like this:
221
222 Rails master hook tasks scheduled:
223
224 * updates the local checkout
225 * updates Rails Contributors
226 * generates and publishes edge docs
227
228 If a new stable tag is detected it also
229
230 * generates and publishes stable docs
231
232 This needs typically a few minutes.
233
234 Note you do not need to specify the tag, the docs server figures it out.
235
236 Also, don't worry if you call that multiple times or the hook is triggered
237 again by some immediate regular push, if the scripts are running new calls
238 are just queued (in a queue of size 1).
Something went wrong with that request. Please try again.