Wiki source code of Release Process

Version 94.1 by Raluca Stavro on 2012/04/07 09:00

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

Get Connected