Wiki source code of Release Process

Version 103.2 by Vincent Massol on 2012/07/12 13:19

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 = Release Overview =
6
7 (% class="centered" %)
8 [[image:releaseProcess.png||style="max-width: 1024px; width: 100%;" title="Release Process Overview"]]
9
10 = Automated Release =
11
12 {{code}}
13 # Get on the maven repository machine
14 me@home:~$ ssh [email protected]
15
16 # Get on the agent machine
17 maven@maven:~$ a1
18
19 # Update the release script
20 hudsonagent@ks365275:~$ cd xwiki-release-scripts ; git pull --rebase ; cd ..
21
22 # Setup the right .gitconfig
23 hudsonagent@ks365275:~$ cp .gitconfig.sdumitriu .gitconfig
24
25 # Import the GPG key
26 hudsonagent@ks365275:~$ gpg --import sdumitriu.gpgkey
27
28 # Set the right version
29 hudsonagent@ks365275:~$ export VERSION=3.3-milestone-1
30
31 # Go to the release sources
32 hudsonagent@ks365275:~$ cd releases/xwiki-trunks/
33
34 # Perform the release
35 hudsonagent@ks365275:~/releases/xwiki-trunks$ ~/maven-release.sh
36
37 # Collect API breakages (clirr reports)
38 hudsonagent@ks365275:~/releases/xwiki-trunks$ cat xwiki-commons/clirr.txt xwiki-rendering/clirr.txt xwiki-platform/clirr.txt xwiki-enterprise/clirr.txt xwiki-manager/clirr.txt
39
40 # Cleanup
41 hudsonagent@ks365275:~/releases/xwiki-trunks$ cd
42 hudsonagent@ks365275:~$ cp .gitconfig.default .gitconfig
43 hudsonagent@ks365275:~$ gpg --delete-secret-and-public-keys `gpg --list-secret-keys | grep ^sec | cut -d/ -f2 | cut '-d ' -f1`
44
45 # Second part of the release, pushing files and posting announcements
46
47 # Go back to maven machine
48 hudsonagent@ks365275:~$ exit
49
50 # Write the short release notes
51 maven@maven:~$ nano releasenotes.txt
52
53 # Start the process
54 maven@maven:~$ export VERSION=3.3-milestone-1
55 maven@maven:~$ ~/push-release.sh
56
57 # Faster, provide the credentials in a file
58 maven@maven:~$ cp example.passwords sdumitriu.passwords
59 maven@maven:~$ nano sdumitriu.passwords
60 maven@maven:~$ ~/push-release.sh sdumitriu.passwords
61 maven@maven:~$ rm sdumitriu.passwords
62 {{/code}}
63
64 {{error}}
65 The second release script doesn't yet update the following:
66 * The Download pages ([[Enterprise>>enterprise:Main.Download]] and [[Manager>>manager:Main.Download]])
67 * The API pages ([[Platform>>platform:DevGuide.API]] and [[Rendering>>rendering:Main.JavaDoc]])
68 * [[WikiMatrix>>http://www.wikimatrix.org/edit/XWiki]]
69 * [[WikiPedia>>http://en.wikipedia.org/wiki/XWiki]]
70 * Maven Central sync for XWiki Commons and Rendering. Ping Vincent (vmassol) on IRC for that ATM.
71 * Update the [[XE Roadmap page>>enterprise:Main.Roadmap]]
72 * You need to update CLIRR version and remove CLIRR excludes
73 {{/error}}
74
75 = Manual Release =
76
77 == Prerequisites ==
78
79 * XWiki releases use Maven 3.x and the Maven Release plugin
80 * Make sure you use Java 6
81 * The XWiki sources are split in several repositories, and each one is released separately
82 * You need to have a key setup for the ##maven## account on maven.xwiki.org (this is the machine hosting XWiki's remote repository) so that you can ssh to it without having to enter username or password (and without using an ssh agent!)
83 * You need to create a ##settings.xml## file in the ##.m2/## directory in your user home with the following configuration in it (This server configuration is the one used by the release and deploy plugins to upload artifacts on the XWiki remote Maven repository):
84
85 {{code language="xml"}}
86 <settings>
87 <profiles>
88 ...
89 </profiles>
90 <activeProfiles>
91 ...
92 </activeProfiles>
93 <servers>
94 <server>
95 <id>maven.xwiki.org</id>
96 <username>maven</username>
97 <privateKey>/Users/vmassol/.ssh/key.ssh2.private.openssh</privateKey>
98 <filePermissions>664</filePermissions>
99 <directoryPermissions>775</directoryPermissions>
100 </server>
101 </servers>
102 </settings>
103 {{/code}}
104
105 {{info}}
106 Replace with your username (if you have one, otherwise use ##maven## username) and the location of your private key of course.
107 {{/info}}
108
109 {{info}}
110 The ##profiles## and ##activeProfiles## settings are the one described on the [[Building page>>Community.Building]].
111 {{/info}}
112
113 == Release Steps ==
114
115 * Start by verifying that the [[Continuous Integration>>Community.ContinuousBuild]] build succeeds before starting any release. If not fix it first.
116 * Create the [[release plan>>Community.ReleasePlans]].
117 * Check all pending JIRA issues one by one and with the community decide what to do for them (postpone to next release, postpone the release, split the issue in 2 since a part was already committed, etc).
118 * Update translations from http://l10n.xwiki.org (Note: better do this before the branching step below since you'll save yourself a merge)
119 * If you're releasing a Release Candidate, first create a branch for the ##commons##, ##rendering##, ##platform##, ##enterprise## and ##manager## modules using ##release:branch##
120 ** Example for ##platform##: ##mvn release:branch -DbranchName=stable-3.1.x -DautoVersionSubmodules=true -DsuppressCommitBeforeBranch -DremoteTagging=false -Pci##
121 ** Example for ##enterprise##: ##mvn release:branch -DbranchName=stable-2.6.x -DautoVersionSubmodules=true -DsuppressCommitBeforeBranch -DremoteTagging=false -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish##
122 ** Example for ##manager##: ##mvn release:branch -DbranchName=stable-2.6.x -DautoVersionSubmodules=true -DsuppressCommitBeforeBranch -DremoteTagging=false -Pci,hsqldb,mysql,pgsql,derby##
123 * Create a release branch
124 ** Example for ##platform##: ##mvn release:branch -DbranchName=release-2.6-rc-1 -DautoVersionSubmodules=true -Pci##
125 ** Example for ##enterprise##: ##mvn release:branch -DbranchName=stable-2.6-rc-1 -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish##
126 ** Example for ##manager##: ##mvn release:branch -DbranchName=stable-2.6-rc-1 -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby##
127 * For each module to release perform the following:
128 ** Resolve all SNAPSHOT **dependencies** and **properties**. The Release plugin will not let you release the module if it has SNAPSHOT dependencies. So if that module is depending on some other XWiki module that has not been released, you'll need to release that module first.
129 ** Go to the directory of the module you wish to release and use ##mvn release:prepare -DautoVersionSubmodules=true -P<profiles to activate>## (the profiles are there to ensure the full build is executed as, for example, some modules are only activated when running on the CI server and need them to run when doing a release). Maven will ask questions about the version of the release, the tag name, etc.
130 *** For all modules except ##enterprise## and ##manager##: ##mvn release:prepare -DautoVersionSubmodules=true -Pci##
131 *** For ##enterprise## and ##manager##: ##mvn release:prepare -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish -Darguments="-N -DskipTests" -DautoVersionSubmodules=true -DskipTests## (It's ok to skip tests since we have already verified that the CI has built fine in steps above)
132 *** {{info}}It's a good practice to do a dry run before running ##mvn release:prepare##. You can do that using ##mvn release:prepare ... -DdryRun=true##.{{/info}}
133 ** Run ##mvn release:perform -DlocalCheckout -P<profiles to activate>##:
134 *** For all modules except ##enterprise## and ##manager##: ##mvn release:perform -DlocalCheckout -Pci##
135 *** For ##enterprise##: ##mvn release:perform -DlocalCheckout -DskipTests -Pci,hsqldb,jetty -Darguments='-Pci,hsqldb,jetty -DskipTests'##
136 *** For ##manager##: ##mvn release:perform -DlocalCheckout -DskipTests -Pmysql -Darguments='-Pmysql -DskipTests'##
137 ** Delete the release branch: ##git checkout master ; git branch -D release-x.y##
138 *** Example for platform: ##git checkout master ; git branch -D release-2.6-rc-1##
139 ** Release the versions in JIRA
140 * Edit the Release Notes to add the API breakage. To do so:
141 ** Edit the ##platform/core/pom.xml## file and remove the CLIRR exclusion, then run the following below and then copy paste the result in the Release Notes(((
142 {{code language="none"}}
143 $ mvn clirr:check -DfailOnError=false -DtextOutputFile=clirr-result.txt
144 $ find . -name clirr-result.txt | xargs cat | grep ERROR | sed -r -e 's/(ERROR: [0-9]+: )|(\s+$)//g'
145 $ find . -name clirr-result.txt -delete
146 {{/code}}
147 )))
148 ** For stable releases update ##platform/core/pom.xml## on trunk by removing all the CLIRR exclusions and updating the comparison version (##<clirr.previous.version>##) to the just released core version
149 * Write the [[release notes>>xwiki:ReleaseNotes.WebHome]]
150 ** For each item in the release notes, ensure that there's a corresponding documentation update or addition on xwiki.org
151 * Upload the files referenced on the [[Download page>>xwiki:Main.Download]] to [[XWiki's OW2 forge project>>http://forge.ow2.org/project/admin/qrs.php?package_id=&group_id=170]](((
152 {{code language="none"}}
153 ssh [email protected]
154 cd public_html/releases/org/xwiki/enterprise/
155 alias ow='/home/maven/ow.sh <YourUserName>'
156 ow xwiki-enterprise-installer-windows/<ReleasedVersion>/xwiki-enterprise-installer-windows-<ReleasedVersion>.exe
157 ...
158 {{/code}}
159 )))
160 * Update the Download page on xwiki.org with the new links to OW2 and post a news announcement on [[OW2>>http://forge.ow2.org/news/submit.php?group_id=170]]
161 * Write an announcement [[blog post on xwiki.org>>xwiki:Blog.WebHome]]
162 * Tweet the Blog post using the XWiki.org account (ask Vincent if you need the credentials) and using the format: {{code}}XWiki Enterprise <N> has been released! Check it out: <URL to Blog post on xwiki.org>{{/code}}
163 * Update the [[Javadoc page>>platform:DevGuide.API]] to link to the new javadoc
164 * Send an [[announcement email>>#HAnnouncementEmailExample]] on the XWiki mailing lists (devs and users)
165 * Updates sites about XWiki releases:
166 ** [[Wikimatrix>>http://www.wikimatrix.org/edit/XWiki]]
167 ** [[Wikipedia (English)>>http://en.wikipedia.org/wiki/XWiki]] (and [[this>>http://en.wikipedia.org/wiki/Comparison_of_wiki_software]], too)
168 ** [[Wikipedia (French)>>http://fr.wikipedia.org/wiki/XWiki]]
169 ** [[Freshmeat>>http://freshmeat.net/projects/xwiki/]] {{warning}}Make sure to write the changelist as paragraph of full sentences {{/warning}}
170 * Update myxwiki.org with the new version. This is to test the stability of the release and find problems on a real farm.
171 * Enjoy some rest and pray that nobody discovers a blocking bug... :)
172 * Start improving the build so that next time all this is done in mere seconds and automatically...
173
174 = Publish to Maven Central =
175
176 XWiki Commons and XWiki Rendering need to be published to Maven Central. To do so we use [[Sonatype's sync>>https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide]]. The strategy is to upload to the XWiki Staging repo on Sonatype's Nexus, to check the staged repo and then to promote it.
177
178 In order to be able to upload to Sonatype's Nexus you'll need to create an account on http://issues.sonatype.org
179
180 * Add the following in your ##settings.xml##:(((
181 {{code}}
182 <server>
183 <id>sonatype-nexus-staging</id>
184 <username>userid</username>
185 <password>password</password>
186 </server>
187 {{/code}}
188 )))
189 * Add passphrase in ##settings.xml## or pass it on command line using ##-Dgpg.passphrase=...##:(((
190 {{code}}
191 ...
192 <profile>
193 <id>xwiki</id>
194 <properties>
195 <gpg.passphrase>password</gpg.passphrase>
196 </properties>
197 ...
198
199 {{/code}}
200 )))
201 * in ##xwiki-commons## and in ##xwiki-rendering##, after having checked out the correct tag, run:(((
202 {{code}}
203 mvn clean deploy -Prelease,legacy,integration-tests -DaltDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2
204 {{/code}}
205
206 {{info}}
207 For XWiki < 4.1:
208
209 {{code}}
210 mvn clean deploy -Prelease,legacy,ci -DaltDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2
211 {{/code}}
212 {{/info}}
213 )))
214 * Then log in https://oss.sonatype.org/ and perform the release steps as indicated on [[Sonatype's synchro doc>>https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide]].
215
216 = Releasing XEclipse =
217
218 {{todo}}
219 XEclipse moved to github, update documentation accordingly.
220 {{/todo}}
221
222 Due to some difficulties in integrating Eclipse PDE Builds and Maven, XEclipse uses a different release process:
223
224 1. Set version numbers to release version in ##pom.xml## and ##MANIFEST.MF## files.
225 1. Create SVN tag for the version to be released.
226 1. Compile and deploy XEclipse plugin: ##mvn deploy -DeclipseInstall=${eclipseDir}##
227 1. Compile and deploy XEclipse standalone for each platform ##mvn deploy -DeclipseInstall=${eclipseDir} -DpdeBuildVersion=${pdeBuildVersion} -Pplatform## where ##platform## is linux, macx86, macppc, windows. In order to discover the value for ${pdeBuildVersion} look at the version of the ##org.eclipse.pde.build## in ##${eclipseDir}/plugins##
228 1. Perform release on Jira
229 1. Upload the generated artifacts to the Objectweb Forge.
230 1. Update wiki pages and download links.
231 1. Post annoucements on mailing lists.
232 1. Create blog post.
233 1. Set version numbers in pom.xml and ##MANIFEST.MF## files to next version-SNAPSHOT.
234
235 = Tips and Troubleshooting =
236
237 * If Maven fails when you run ##release:prepare## run first ##mvn clean install##.
238 * The Maven release plugin stores some properties files to keep track of where it is in the release process. If you need to start over and clean those files you can run ##mvn release:clean##
239 * If Maven fails to upload an artifact to the XWiki remote repository, it's possible there's a problem of permissions in that repository. In that case you'll need to log on maven.xwiki.org, go in ##/home/maven/public_html/repository/*## and fix the permission.
240 * If you are running Mac OS X 10.5 and have errors while checking in files in SVN during the release process, you might want to read [[this thread>>http://www.nabble.com/Possible-Bug-with-%22--non-interactive%22-mode-on-OS-X-Leopard-to14338652.html]]. A workaround is to store your password in clear text in your subversion configuration files.
241
242 = Announcement Email Example =
243
244 {{code language="none"}}
245 The XWiki development team is pleased to announce the release of XWiki Enterprise 1.2 RC 3.
246
247 Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
248
249 This is the third and hopefully last release candidate for the 1.2 version. It fixes several bugs, especially regading Oracle support. The final release is still planned for mid-January.
250
251 Changes from 1.2RC2:
252
253 * XWIKI-1993: Database schema update issue when migrating from XE 1.1.2 to 1.2 RC2 on Oracle 10g
254 * XWIKI-1995: Error inserting NULL values in NOT-NULL fields under Oracle for Version Comments/Authors
255 * XWIKI-1975: Exception displayed in the log when upgrading from a previous 1.2 release to 1.2 RC2
256 * XWIKI-1979: FileUploadPlugin should not call cleanFileList in endRendering
257 * XWIKI-1981: UI issue when using the new rights managements UI with IE7
258 * XWIKI-1946: Attachment renaming in the WYSIWYG Editor doesn't keep the file extension
259 * XE-175: Show the "delete" button next to members in the group only when the group is edited
260
261 For more information see the Release notes at:
262 http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWikiEnterprise401
263
264 Thanks
265 -The XWiki dev team
266 {{/code}}
267
268 = Older commands to perform a release =
269
270 {{warning}}
271 These commands have now been superseded by the automated release script defined at the top of this document.
272 {{/warning}}
273
274 == Updating Translations ==
275
276 These commands or something very much like them should work for updating translations.
277 NOTE: Since I run firefox as a different user, my downloads end up in /home/firefox/Desktop, change accordingly for your setup.
278
279 {{code language="none"}}
280 export BRANCH=<branch you are committing against>
281
282 cd /home/firefox/Desktop/
283 su firefox
284 rm Wysiwyg_Wysiwyg.Stringsproperties.zip Wysiwyg_Wysiwyg.Stringsproperties.zip Wysiwyg_Wysiwyg.WidgetResources.zip Wysiwyg_Wysiwyg.WYSIWYGEditorCoreParametrizedResources.zip XEM_XEM.ApplicationManager.zip XEM_XEM.WikiManager.zip XEM_XEM.XEMtranslations.zip XEM_XEM.XEMWebHome.zip XE_XE.MainWebHome.zip XE_XE.SandboxWebHome.zip XE_XE.XWikiCoreResources.zip XE_XE.XWikiXWikiSyntax.zip
285
286 In firefox goto:
287 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.XWikiCoreResources&app=XE
288 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.MainWebHome&app=XE
289 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.SandboxWebHome&app=XE
290 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.XWikiXWikiSyntax&app=XE
291 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.XEMtranslations&app=XEM
292 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.WikiManager&app=XEM
293 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.ApplicationManager&app=XEM
294 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.XEMWebHome&app=XEM
295 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=Wysiwyg.Stringsproperties&app=Wysiwyg
296 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=Wysiwyg.WidgetResources&app=Wysiwyg
297 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=Wysiwyg.WYSIWYGEditorCoreParametrizedResources&app=Wysiwyg https://github.com/xwiki/xwiki-platform/raw/master/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-client/src/main/resources/org/xwiki/gwt/wysiwyg/client/Messages.properties
298
299
300 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/
301 git co $BRANCH ; git reset --hard ; git clean -dxf ; git pull
302 cp /home/firefox/Desktop/XE_XE.XWikiCoreResources.zip ./
303 unzip -o XE_XE.XWikiCoreResources.zip ; rm XE_XE.XWikiCoreResources.zip
304
305
306 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-client/src/main/resources/org/xwiki/gwt/wysiwyg/client/
307 cp /home/firefox/Desktop/Wysiwyg_Wysiwyg.Stringsproperties.zip ./
308 unzip -o Wysiwyg_Wysiwyg.Stringsproperties.zip ; rm ./Wysiwyg_Wysiwyg.Stringsproperties.zip
309
310
311 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-gwt/xwiki-platform-gwt-user/src/main/resources/org/xwiki/gwt/user/client/
312 cp /home/firefox/Desktop/Wysiwyg_Wysiwyg.WidgetResources.zip ./
313 unzip -o Wysiwyg_Wysiwyg.WidgetResources.zip ; rm ./Wysiwyg_Wysiwyg.WidgetResources.zip
314
315
316 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-client/src/main/resources/org/xwiki/gwt/wysiwyg/client/
317 cp /home/firefox/Desktop/Wysiwyg_Wysiwyg.WYSIWYGEditorCoreParametrizedResources.zip ./
318 unzip -o ./Wysiwyg_Wysiwyg.WYSIWYGEditorCoreParametrizedResources.zip ; rm ./Wysiwyg_Wysiwyg.WYSIWYGEditorCoreParametrizedResources.zip
319
320
321 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-wiki-manager/xwiki-platform-wiki-manager-ui/src/main/resources/
322 cp /home/firefox/Desktop/XEM_XEM.WikiManager.zip ./
323 unzip -o ./XEM_XEM.WikiManager.zip ; rm ./XEM_XEM.WikiManager.zip
324
325
326 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-application-manager/xwiki-platform-application-manager-ui/src/main/resources/
327 cp /home/firefox/Desktop/XEM_XEM.ApplicationManager.zip ./
328 unzip -o ./XEM_XEM.ApplicationManager.zip ; rm ./XEM_XEM.ApplicationManager.zip
329
330
331 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-manager/xwiki-manager-applications/xwiki-manager-application-xem/src/main/resources/
332 git co $BRANCH ; git reset --hard ; git clean -dxf ; git pull
333 cp /home/firefox/Desktop/XEM_XEM.XEMWebHome.zip ./
334 unzip -o ./XEM_XEM.XEMWebHome.zip ; rm ./XEM_XEM.XEMWebHome.zip
335 cp /home/firefox/Desktop/XEM_XEM.XEMtranslations.zip ./
336 unzip -o ./XEM_XEM.XEMtranslations.zip ; rm ./XEM_XEM.XEMtranslations.zip
337
338
339 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-enterprise/xwiki-enterprise-wiki/src/main/resources/
340 git co $BRANCH ; git reset --hard ; git clean -dxf ; git pull
341 cp /home/firefox/Desktop/XE_XE.XWikiXWikiSyntax.zip ./
342 unzip -o ./XE_XE.XWikiXWikiSyntax.zip ; rm ./XE_XE.XWikiXWikiSyntax.zip
343 cp /home/firefox/Desktop/XE_XE.SandboxWebHome.zip ./
344 unzip -o ./XE_XE.SandboxWebHome.zip ; rm ./XE_XE.SandboxWebHome.zip
345 cp /home/firefox/Desktop/XE_XE.MainWebHome.zip ./
346 unzip -o ./XE_XE.MainWebHome.zip ; rm ./XE_XE.MainWebHome.zip
347
348 git add . ; git commit -m "[release] Updated translations." ; git push
349 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-manager/
350 git add . ; git commit -m "[release] Updated translations." ; git push
351 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/
352 git add . ; git commit -m "[release] Updated translations." ; git push
353 {{/code}}
354
355 == Releasing ==
356
357 This is a reasonably effective line by line instruction manual for performing a release, unless something is amiss, these commands should work (almost) by copy/paste
358
359 {{code language="none"}}
360 # Notes:
361 `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION <-- this gives you the tag name, something like xwiki-rendering-3.1-milestone-2
362
363 Release naming conventions:
364 xwiki-enterprise-2.4.2 - Bugfix release
365 xwiki-enterprise-3.0-milestone-1 - Milestone release
366 xwiki-enterprise-2.7-rc-1 - Release Candidate release
367 xwiki-enterprise-3.0-SNAPSHOT - Snapshot
368
369
370 Preparation:
371 <bring agent offline with jenkins>
372 cp ~/.gitconfig.cjdelisle ~/.gitconfig
373 export VERSION=<release version number>
374 export BRANCH=<branch name>
375 on localhost: export VERSION=<release version number>
376 on localhost: export BRANCH=<branch name>
377 cat /home/hudsonagent/.ssh/id_dsa.pub
378 <add key to github>
379
380 cd releases/xwiki-trunks/xwiki-commons/
381 git reset --hard HEAD && git co master && git reset --hard HEAD && git clean -dxf && git pull && (git co -b $BRANCH --track origin/$BRANCH || git co $BRANCH) && git co -b $VERSION && git push origin $VERSION
382 cd ../xwiki-rendering
383 git reset --hard HEAD && git co master && git reset --hard HEAD && git clean -dxf && git pull && (git co -b $BRANCH --track origin/$BRANCH || git co $BRANCH) && git co -b $VERSION && git push origin $VERSION
384 cd ../xwiki-platform
385 git reset --hard HEAD && git co master && git reset --hard HEAD && git clean -dxf && git pull && (git co -b $BRANCH --track origin/$BRANCH || git co $BRANCH) && git co -b $VERSION && git push origin $VERSION
386 cd ../xwiki-enterprise
387 git reset --hard HEAD && git co master && git reset --hard HEAD && git clean -dxf && git pull && (git co -b $BRANCH --track origin/$BRANCH || git co $BRANCH) && git co -b $VERSION && git push origin $VERSION
388 cd ../xwiki-manager
389 git reset --hard HEAD && git co master && git reset --hard HEAD && git clean -dxf && git pull && (git co -b $BRANCH --track origin/$BRANCH || git co $BRANCH) && git co -b $VERSION && git push origin $VERSION
390
391
392 Commons:
393 cd ../xwiki-commons
394 # NOTE: As of 3.2, there is a new line in pom.xml which must be changed.
395 # <commons.version>3.2-SNAPSHOT</commons.version> needs to reflect the current version.
396 mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DautoVersionSubmodules=true -DreleaseVersion=$VERSION
397 mvn release:perform -DpushChanges=false -DlocalCheckout=true
398 git push
399 git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
400 <do signed tag on local>
401 git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
402
403
404 Rendering:
405 cd ../xwiki-rendering/
406
407 ## this is dangerous, find a better way!
408 #mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION
409
410 # no longer needed
411 #ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh
412
413 git commit -a -m "[release] changed version numbers to $VERSION"
414 mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DautoVersionSubmodules=true -DreleaseVersion=$VERSION
415 mvn release:perform -DpushChanges=false -DlocalCheckout=true
416 git push
417 git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
418 <do signed tag on local>
419 git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
420
421 Platform:
422 cd ../xwiki-platform/
423
424 ## this is dangerous, find a better way!
425 #mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION
426
427 # no longer needed
428 #ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh
429
430 git commit -a -m "[release] changed version numbers to $VERSION"
431 mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DreleaseVersion=$VERSION -DautoVersionSubmodules=true -Pci
432 mvn release:perform -DpushChanges=false -DlocalCheckout=true
433 git push
434 git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
435 <do signed tag on local>
436 git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
437
438 Enterprise:
439 cd ../xwiki-enterprise/
440 ## this is dangerous, find a better way!
441 #mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION
442
443 # no longer needed
444 # ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh
445
446 git commit -a -m "[release] changed version numbers to $VERSION"
447 mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DreleaseVersion=$VERSION -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish -Darguments="-N"
448 mvn release:perform -DpushChanges=false -DlocalCheckout=true -Pci,hsqldb,jetty -DskipTests -Darguments='-Pci,hsqldb,jetty -DskipTests'
449 git push
450 git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
451 <do signed tag on local>
452 git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
453 # Get the hashes of the released files:
454 find ./ -name "xwiki-enterprise-installer-generic-$VERSION-standard.jar" -exec sha1sum {} \;
455 find ./ -name "xwiki-enterprise-installer-windows-$VERSION.exe" -exec sha1sum {} \;
456 find ./ -name "xwiki-enterprise-jetty-hsqldb-$VERSION.zip" -exec sha1sum {} \;
457 find ./ -name "xwiki-enterprise-web-$VERSION.war" -exec sha1sum {} \;
458 find ./ -name 'xwiki-enterprise-wiki.xar' -exec sha1sum {} \;
459
460 Manager:
461 cd ../xwiki-manager/
462 ## this is dangerous, find a better way!
463 #mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION
464
465 # no longer needed
466 ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh
467
468 git commit -a -m "[release] changed version numbers to $VERSION"
469 mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DreleaseVersion=$VERSION -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish -Darguments="-N"
470 mvn release:perform -DpushChanges=false -DlocalCheckout=true -Pmysql -Darguments='-Pmysql'
471 git push
472 git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
473 <do signed tag on local>
474 git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
475 # Get the hashes of the released files:
476 find ./ -name '*.war' -exec sha1sum {} \;
477 find ./ -name '*.xar' -exec sha1sum {} \;
478 find ./ -name '*.zip' -exec sha1sum {} \;
479
480
481 Teardown:
482 mv /home/hudsonagent/.gitconfig.default /home/hudsonagent/.gitconfig
483 <remove agent key from github>
484 <bring agent offline with jenkins>
485
486
487 Signed Tagging On localhost:
488 git pull
489 git checkout <sha1>
490 git tag -u 0x65B209D6 `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION -m "Releasing XWiki $VERSION"
491 # 0x65B209D6 == key id, if your email is right then -s might work instead
492 git show `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
493 # make sure everything looks right
494 git push --tags
495 {{/code}}

Get Connected