Wiki source code of Release Process

Version 100.2 by Vincent Massol on 2012/04/17 17:40

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 up ; 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 {{/error}}
73
74 = Manual Release =
75
76 == Prerequisites ==
77
78 * XWiki releases use Maven 3.x and the Maven Release plugin
79 * Make sure you use Java 6
80 * The XWiki sources are split in several repositories, and each one is released separately
81 * 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!)
82 * 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):
83
84 {{code language="xml"}}
85 <settings>
86 <profiles>
87 ...
88 </profiles>
89 <activeProfiles>
90 ...
91 </activeProfiles>
92 <servers>
93 <server>
94 <id>maven.xwiki.org</id>
95 <username>maven</username>
96 <privateKey>/Users/vmassol/.ssh/key.ssh2.private.openssh</privateKey>
97 <filePermissions>664</filePermissions>
98 <directoryPermissions>775</directoryPermissions>
99 </server>
100 </servers>
101 </settings>
102 {{/code}}
103
104 {{info}}
105 Replace with your username (if you have one, otherwise use ##maven## username) and the location of your private key of course.
106 {{/info}}
107
108 {{info}}
109 The ##profiles## and ##activeProfiles## settings are the one described on the [[Building page>>Community.Building]].
110 {{/info}}
111
112 == Release Steps ==
113
114 * Start by verifying that the [[Continuous Integration>>Community.ContinuousBuild]] build succeeds before starting any release. If not fix it first.
115 * Create the [[release plan>>Community.ReleasePlans]].
116 * 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).
117 * Update translations from http://l10n.xwiki.org (Note: better do this before the branching step below since you'll save yourself a merge)
118 * If you're releasing a Release Candidate, first create a branch for the ##commons##, ##rendering##, ##platform##, ##enterprise## and ##manager## modules using ##release:branch##
119 ** Example for ##platform##: ##mvn release:branch -DbranchName=stable-3.1.x -DautoVersionSubmodules=true -DsuppressCommitBeforeBranch -DremoteTagging=false -Pci##
120 ** Example for ##enterprise##: ##mvn release:branch -DbranchName=stable-2.6.x -DautoVersionSubmodules=true -DsuppressCommitBeforeBranch -DremoteTagging=false -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish##
121 ** Example for ##manager##: ##mvn release:branch -DbranchName=stable-2.6.x -DautoVersionSubmodules=true -DsuppressCommitBeforeBranch -DremoteTagging=false -Pci,hsqldb,mysql,pgsql,derby##
122 * Create a release branch
123 ** Example for ##platform##: ##mvn release:branch -DbranchName=release-2.6-rc-1 -DautoVersionSubmodules=true -Pci##
124 ** Example for ##enterprise##: ##mvn release:branch -DbranchName=stable-2.6-rc-1 -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish##
125 ** Example for ##manager##: ##mvn release:branch -DbranchName=stable-2.6-rc-1 -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby##
126 * For each module to release perform the following:
127 ** 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.
128 ** 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.
129 *** For all modules except ##enterprise## and ##manager##: ##mvn release:prepare -DautoVersionSubmodules=true -Pci##
130 *** 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)
131 *** {{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}}
132 ** Run ##mvn release:perform -DlocalCheckout -P<profiles to activate>##:
133 *** For all modules except ##enterprise## and ##manager##: ##mvn release:perform -DlocalCheckout -Pci##
134 *** For ##enterprise##: ##mvn release:perform -DlocalCheckout -DskipTests -Pci,hsqldb,jetty -Darguments='-Pci,hsqldb,jetty -DskipTests'##
135 *** For ##manager##: ##mvn release:perform -DlocalCheckout -DskipTests -Pmysql -Darguments='-Pmysql -DskipTests'##
136 ** Delete the release branch: ##git checkout master ; git branch -D release-x.y##
137 *** Example for platform: ##git checkout master ; git branch -D release-2.6-rc-1##
138 ** Release the versions in JIRA
139 * Edit the Release Notes to add the API breakage. To do so:
140 ** 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(((
141 {{code language="none"}}
142 $ mvn clirr:check -DfailOnError=false -DtextOutputFile=clirr-result.txt
143 $ find . -name clirr-result.txt | xargs cat | grep ERROR | sed -r -e 's/(ERROR: [0-9]+: )|(\s+$)//g'
144 $ find . -name clirr-result.txt -delete
145 {{/code}}
146 )))
147 ** 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
148 * Write the [[release notes>>xwiki:ReleaseNotes.WebHome]]
149 ** For each item in the release notes, ensure that there's a corresponding documentation update or addition on xwiki.org
150 * 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]](((
151 {{code language="none"}}
152 ssh [email protected]
153 cd public_html/releases/org/xwiki/enterprise/
154 alias ow='/home/maven/ow.sh <YourUserName>'
155 ow xwiki-enterprise-installer-windows/<ReleasedVersion>/xwiki-enterprise-installer-windows-<ReleasedVersion>.exe
156 ...
157 {{/code}}
158 )))
159 * 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]]
160 * Write an announcement [[blog post on xwiki.org>>xwiki:Blog.WebHome]]
161 * 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}}
162 * Update the [[Javadoc page>>platform:DevGuide.API]] to link to the new javadoc
163 * Send an [[announcement email>>#HAnnouncementEmailExample]] on the XWiki mailing lists (devs and users)
164 * Updates sites about XWiki releases:
165 ** [[Wikimatrix>>http://www.wikimatrix.org/edit/XWiki]]
166 ** [[Wikipedia (English)>>http://en.wikipedia.org/wiki/XWiki]] (and [[this>>http://en.wikipedia.org/wiki/Comparison_of_wiki_software]], too)
167 ** [[Wikipedia (French)>>http://fr.wikipedia.org/wiki/XWiki]]
168 ** [[Freshmeat>>http://freshmeat.net/projects/xwiki/]] {{warning}}Make sure to write the changelist as paragraph of full sentences {{/warning}}
169 * Update myxwiki.org with the new version. This is to test the stability of the release and find problems on a real farm.
170 * Enjoy some rest and pray that nobody discovers a blocking bug... :)
171 * Start improving the build so that next time all this is done in mere seconds and automatically...
172
173 = Publish to Maven Central =
174
175 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.
176
177 In order to be able to upload to Sonatype's Nexus you'll need to create an account on http://issues.sonatype.org
178
179 * Add the following in your ##settings.xml##:(((
180 {{code}}
181 <server>
182 <id>sonatype-nexus-staging</id>
183 <username>userid</username>
184 <password>password</password>
185 </server>
186 {{/code}}
187 )))
188 * Add passphrase in ##settings.xml## or pass it on command line using ##-Dgpg.passphrase=...##:(((
189 {{code}}
190 ...
191 <profile>
192 <id>xwiki</id>
193 <properties>
194 <gpg.passphrase>password</gpg.passphrase>
195 </properties>
196 ...
197
198 {{/code}}
199 )))
200 * in ##xwiki-commons## and in ##xwiki-rendering##, after having checked out the correct tag, run:(((
201 {{code}}
202 mvn clean deploy -Prelease,legacy,integration-tests -DaltDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2
203 {{/code}}
204
205 {{info}}
206 For XWiki < 4.1:
207
208 {{code}}
209 mvn clean deploy -Prelease,ci -DaltDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2
210 {{/code}}
211 {{/info}}
212 )))
213 * 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]].
214
215 = Releasing XEclipse =
216
217 {{todo}}
218 XEclipse moved to github, update documentation accordingly.
219 {{/todo}}
220
221 Due to some difficulties in integrating Eclipse PDE Builds and Maven, XEclipse uses a different release process:
222
223 1. Set version numbers to release version in ##pom.xml## and ##MANIFEST.MF## files.
224 1. Create SVN tag for the version to be released.
225 1. Compile and deploy XEclipse plugin: ##mvn deploy -DeclipseInstall=${eclipseDir}##
226 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##
227 1. Perform release on Jira
228 1. Upload the generated artifacts to the Objectweb Forge.
229 1. Update wiki pages and download links.
230 1. Post annoucements on mailing lists.
231 1. Create blog post.
232 1. Set version numbers in pom.xml and ##MANIFEST.MF## files to next version-SNAPSHOT.
233
234 = Tips and Troubleshooting =
235
236 * If Maven fails when you run ##release:prepare## run first ##mvn clean install##.
237 * 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##
238 * 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.
239 * 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.
240
241 = Announcement Email Example =
242
243 {{code language="none"}}
244 The XWiki development team is pleased to announce the release of XWiki Enterprise 1.2 RC 3.
245
246 Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
247
248 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.
249
250 Changes from 1.2RC2:
251
252 * XWIKI-1993: Database schema update issue when migrating from XE 1.1.2 to 1.2 RC2 on Oracle 10g
253 * XWIKI-1995: Error inserting NULL values in NOT-NULL fields under Oracle for Version Comments/Authors
254 * XWIKI-1975: Exception displayed in the log when upgrading from a previous 1.2 release to 1.2 RC2
255 * XWIKI-1979: FileUploadPlugin should not call cleanFileList in endRendering
256 * XWIKI-1981: UI issue when using the new rights managements UI with IE7
257 * XWIKI-1946: Attachment renaming in the WYSIWYG Editor doesn't keep the file extension
258 * XE-175: Show the "delete" button next to members in the group only when the group is edited
259
260 For more information see the Release notes at:
261 http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise12RC3
262
263 Thanks
264 -The XWiki dev team
265 {{/code}}
266
267 = Older commands to perform a release =
268
269 {{warning}}These commands have now been superseded by the automated release script defined at the top of this document.{{/warning}}
270
271 == Updating Translations ==
272
273 These commands or something very much like them should work for updating translations.
274 NOTE: Since I run firefox as a different user, my downloads end up in /home/firefox/Desktop, change accordingly for your setup.
275
276 {{code language="none"}}
277 export BRANCH=<branch you are committing against>
278
279 cd /home/firefox/Desktop/
280 su firefox
281 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
282
283 In firefox goto:
284 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.XWikiCoreResources&app=XE
285 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.MainWebHome&app=XE
286 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.SandboxWebHome&app=XE
287 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.XWikiXWikiSyntax&app=XE
288 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.XEMtranslations&app=XEM
289 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.WikiManager&app=XEM
290 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.ApplicationManager&app=XEM
291 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.XEMWebHome&app=XEM
292 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=Wysiwyg.Stringsproperties&app=Wysiwyg
293 http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=Wysiwyg.WidgetResources&app=Wysiwyg
294 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
295
296
297 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/
298 git co $BRANCH ; git reset --hard ; git clean -dxf ; git pull
299 cp /home/firefox/Desktop/XE_XE.XWikiCoreResources.zip ./
300 unzip -o XE_XE.XWikiCoreResources.zip ; rm XE_XE.XWikiCoreResources.zip
301
302
303 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/
304 cp /home/firefox/Desktop/Wysiwyg_Wysiwyg.Stringsproperties.zip ./
305 unzip -o Wysiwyg_Wysiwyg.Stringsproperties.zip ; rm ./Wysiwyg_Wysiwyg.Stringsproperties.zip
306
307
308 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/
309 cp /home/firefox/Desktop/Wysiwyg_Wysiwyg.WidgetResources.zip ./
310 unzip -o Wysiwyg_Wysiwyg.WidgetResources.zip ; rm ./Wysiwyg_Wysiwyg.WidgetResources.zip
311
312
313 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/
314 cp /home/firefox/Desktop/Wysiwyg_Wysiwyg.WYSIWYGEditorCoreParametrizedResources.zip ./
315 unzip -o ./Wysiwyg_Wysiwyg.WYSIWYGEditorCoreParametrizedResources.zip ; rm ./Wysiwyg_Wysiwyg.WYSIWYGEditorCoreParametrizedResources.zip
316
317
318 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-wiki-manager/xwiki-platform-wiki-manager-ui/src/main/resources/
319 cp /home/firefox/Desktop/XEM_XEM.WikiManager.zip ./
320 unzip -o ./XEM_XEM.WikiManager.zip ; rm ./XEM_XEM.WikiManager.zip
321
322
323 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-application-manager/xwiki-platform-application-manager-ui/src/main/resources/
324 cp /home/firefox/Desktop/XEM_XEM.ApplicationManager.zip ./
325 unzip -o ./XEM_XEM.ApplicationManager.zip ; rm ./XEM_XEM.ApplicationManager.zip
326
327
328 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-manager/xwiki-manager-applications/xwiki-manager-application-xem/src/main/resources/
329 git co $BRANCH ; git reset --hard ; git clean -dxf ; git pull
330 cp /home/firefox/Desktop/XEM_XEM.XEMWebHome.zip ./
331 unzip -o ./XEM_XEM.XEMWebHome.zip ; rm ./XEM_XEM.XEMWebHome.zip
332 cp /home/firefox/Desktop/XEM_XEM.XEMtranslations.zip ./
333 unzip -o ./XEM_XEM.XEMtranslations.zip ; rm ./XEM_XEM.XEMtranslations.zip
334
335
336 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-enterprise/xwiki-enterprise-wiki/src/main/resources/
337 git co $BRANCH ; git reset --hard ; git clean -dxf ; git pull
338 cp /home/firefox/Desktop/XE_XE.XWikiXWikiSyntax.zip ./
339 unzip -o ./XE_XE.XWikiXWikiSyntax.zip ; rm ./XE_XE.XWikiXWikiSyntax.zip
340 cp /home/firefox/Desktop/XE_XE.SandboxWebHome.zip ./
341 unzip -o ./XE_XE.SandboxWebHome.zip ; rm ./XE_XE.SandboxWebHome.zip
342 cp /home/firefox/Desktop/XE_XE.MainWebHome.zip ./
343 unzip -o ./XE_XE.MainWebHome.zip ; rm ./XE_XE.MainWebHome.zip
344
345 git add . ; git commit -m "[release] Updated translations." ; git push
346 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-manager/
347 git add . ; git commit -m "[release] Updated translations." ; git push
348 cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/
349 git add . ; git commit -m "[release] Updated translations." ; git push
350 {{/code}}
351
352 == Releasing ==
353
354 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
355
356 {{code language="none"}}
357 # Notes:
358 `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION <-- this gives you the tag name, something like xwiki-rendering-3.1-milestone-2
359
360 Release naming conventions:
361 xwiki-enterprise-2.4.2 - Bugfix release
362 xwiki-enterprise-3.0-milestone-1 - Milestone release
363 xwiki-enterprise-2.7-rc-1 - Release Candidate release
364 xwiki-enterprise-3.0-SNAPSHOT - Snapshot
365
366
367 Preparation:
368 <bring agent offline with jenkins>
369 cp ~/.gitconfig.cjdelisle ~/.gitconfig
370 export VERSION=<release version number>
371 export BRANCH=<branch name>
372 on localhost: export VERSION=<release version number>
373 on localhost: export BRANCH=<branch name>
374 cat /home/hudsonagent/.ssh/id_dsa.pub
375 <add key to github>
376
377 cd releases/xwiki-trunks/xwiki-commons/
378 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
379 cd ../xwiki-rendering
380 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
381 cd ../xwiki-platform
382 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
383 cd ../xwiki-enterprise
384 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
385 cd ../xwiki-manager
386 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
387
388
389 Commons:
390 cd ../xwiki-commons
391 # NOTE: As of 3.2, there is a new line in pom.xml which must be changed.
392 # <commons.version>3.2-SNAPSHOT</commons.version> needs to reflect the current version.
393 mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DautoVersionSubmodules=true -DreleaseVersion=$VERSION
394 mvn release:perform -DpushChanges=false -DlocalCheckout=true
395 git push
396 git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
397 <do signed tag on local>
398 git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
399
400
401 Rendering:
402 cd ../xwiki-rendering/
403
404 ## this is dangerous, find a better way!
405 #mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION
406
407 # no longer needed
408 #ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh
409
410 git commit -a -m "[release] changed version numbers to $VERSION"
411 mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DautoVersionSubmodules=true -DreleaseVersion=$VERSION
412 mvn release:perform -DpushChanges=false -DlocalCheckout=true
413 git push
414 git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
415 <do signed tag on local>
416 git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
417
418 Platform:
419 cd ../xwiki-platform/
420
421 ## this is dangerous, find a better way!
422 #mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION
423
424 # no longer needed
425 #ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh
426
427 git commit -a -m "[release] changed version numbers to $VERSION"
428 mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DreleaseVersion=$VERSION -DautoVersionSubmodules=true -Pci
429 mvn release:perform -DpushChanges=false -DlocalCheckout=true
430 git push
431 git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
432 <do signed tag on local>
433 git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
434
435 Enterprise:
436 cd ../xwiki-enterprise/
437 ## this is dangerous, find a better way!
438 #mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION
439
440 # no longer needed
441 # ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh
442
443 git commit -a -m "[release] changed version numbers to $VERSION"
444 mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DreleaseVersion=$VERSION -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish -Darguments="-N"
445 mvn release:perform -DpushChanges=false -DlocalCheckout=true -Pci,hsqldb,jetty -DskipTests -Darguments='-Pci,hsqldb,jetty -DskipTests'
446 git push
447 git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
448 <do signed tag on local>
449 git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
450 # Get the hashes of the released files:
451 find ./ -name "xwiki-enterprise-installer-generic-$VERSION-standard.jar" -exec sha1sum {} \;
452 find ./ -name "xwiki-enterprise-installer-windows-$VERSION.exe" -exec sha1sum {} \;
453 find ./ -name "xwiki-enterprise-jetty-hsqldb-$VERSION.zip" -exec sha1sum {} \;
454 find ./ -name "xwiki-enterprise-web-$VERSION.war" -exec sha1sum {} \;
455 find ./ -name 'xwiki-enterprise-wiki.xar' -exec sha1sum {} \;
456
457 Manager:
458 cd ../xwiki-manager/
459 ## this is dangerous, find a better way!
460 #mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION
461
462 # no longer needed
463 ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh
464
465 git commit -a -m "[release] changed version numbers to $VERSION"
466 mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DreleaseVersion=$VERSION -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish -Darguments="-N"
467 mvn release:perform -DpushChanges=false -DlocalCheckout=true -Pmysql -Darguments='-Pmysql'
468 git push
469 git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
470 <do signed tag on local>
471 git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
472 # Get the hashes of the released files:
473 find ./ -name '*.war' -exec sha1sum {} \;
474 find ./ -name '*.xar' -exec sha1sum {} \;
475 find ./ -name '*.zip' -exec sha1sum {} \;
476
477
478 Teardown:
479 mv /home/hudsonagent/.gitconfig.default /home/hudsonagent/.gitconfig
480 <remove agent key from github>
481 <bring agent offline with jenkins>
482
483
484 Signed Tagging On localhost:
485 git pull
486 git checkout <sha1>
487 git tag -u 0x65B209D6 `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION -m "Releasing XWiki $VERSION"
488 # 0x65B209D6 == key id, if your email is right then -s might work instead
489 git show `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
490 # make sure everything looks right
491 git push --tags
492 {{/code}}

Get Connected