Wiki source code of Release Process

Version 91.2 by Vincent Massol on 2012/01/24 17:37

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

Get Connected