Wiki source code of Release Process

Last modified by Vincent Massol on 2016/04/05 15:02

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

Get Connected