Release Process

Last modified by Simon Urli on 2023/10/10 11:52

This page is deprecated and no longer used when performing releases, instead go to the Release Plan page.

We keep it temporarily since it contains old ways of doing releases.

Release Overview

releaseProcess.png

Automated Release

# Get on the maven repository machine
me@home:~$ ssh maven@maven.xwiki.org

# Get on the agent machine
maven@maven:~$ a1

# Update the release script
hudsonagent@ks365275:~$ cd xwiki-release-scripts ; git pull --rebase ; cd ..

# Setup the right .gitconfig
hudsonagent@ks365275:~$ cp .gitconfig.sdumitriu .gitconfig

# Import the GPG key
hudsonagent@ks365275:~$ gpg --import sdumitriu.gpgkey

# Set the right version
hudsonagent@ks365275:~$ export VERSION=3.3-milestone-1

# Go to the release sources
hudsonagent@ks365275:~$ cd releases/xwiki-trunks/

# Perform the release
hudsonagent@ks365275:~/releases/xwiki-trunks$ ~/maven-release.sh

# Collect API breakages (clirr reports)
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

# Cleanup
hudsonagent@ks365275:~/releases/xwiki-trunks$ cd
hudsonagent@ks365275:~$ cp .gitconfig.default .gitconfig
hudsonagent@ks365275:~$ gpg --delete-secret-and-public-keys `gpg --list-secret-keys | grep ^sec | cut -d/ -f2 | cut '-d ' -f1`

# Second part of the release, pushing files and posting announcements

# Go back to maven machine
hudsonagent@ks365275:~$ exit

# Write the short release notes
maven@maven:~$ nano releasenotes.txt

# Start the process
maven@maven:~$ export VERSION=3.3-milestone-1
maven@maven:~$ ~/push-release.sh

# Faster, provide the credentials in a file
maven@maven:~$ cp example.passwords sdumitriu.passwords
maven@maven:~$ nano sdumitriu.passwords
maven@maven:~$ ~/push-release.sh sdumitriu.passwords
maven@maven:~$ rm sdumitriu.passwords

The second release script doesn't yet update the following:

Manual Release

Prerequisites

  • XWiki releases use Maven 3.x and the Maven Release plugin
  • Make sure you use Java 6
  • The XWiki sources are split in several repositories, and each one is released separately
  • 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!)
  • 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):
<settings>
 <profiles>
    ...
 </profiles>
 <activeProfiles>
    ...
 </activeProfiles>
 <servers>
   <server>
     <id>maven.xwiki.org</id>
     <username>maven</username>
     <privateKey>/Users/vmassol/.ssh/key.ssh2.private.openssh</privateKey>
     <filePermissions>664</filePermissions>
     <directoryPermissions>775</directoryPermissions>
   </server>
 </servers>
</settings>       

Replace with your username (if you have one, otherwise use maven username) and the location of your private key of course.

The profiles and activeProfiles settings are the one described on the Building page.

Release Steps

  • Start by verifying that the Continuous Integration build succeeds before starting any release. If not fix it first.
  • Create the release plan.
  • 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).
  • Update translations from http://l10n.xwiki.org (Note: better do this before the branching step below since you'll save yourself a merge)
  • If you're releasing a Release Candidate, first create a branch for the commons, rendering, platform, enterprise and manager modules using release:branch
    • Example for platform: mvn release:branch -DbranchName=stable-3.1.x -DautoVersionSubmodules=true -DsuppressCommitBeforeBranch -DremoteTagging=false -Pci
    • Example for enterprise: mvn release:branch -DbranchName=stable-2.6.x -DautoVersionSubmodules=true -DsuppressCommitBeforeBranch -DremoteTagging=false -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish
    • Example for manager: mvn release:branch -DbranchName=stable-2.6.x -DautoVersionSubmodules=true -DsuppressCommitBeforeBranch -DremoteTagging=false -Pci,hsqldb,mysql,pgsql,derby
  • Create a release branch
    • Example for platform: mvn release:branch -DbranchName=release-2.6-rc-1 -DautoVersionSubmodules=true -Pci
    • Example for enterprise: mvn release:branch -DbranchName=stable-2.6-rc-1 -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish
    • Example for manager: mvn release:branch -DbranchName=stable-2.6-rc-1 -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby
  • For each module to release perform the following:
    • 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.
    • 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.
      • For all modules except enterprise and manager: mvn release:prepare -DautoVersionSubmodules=true -Pci
      • 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)
      • 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.
    • Run mvn release:perform -DlocalCheckout -P<profiles to activate>:
      • For all modules except enterprise and manager: mvn release:perform -DlocalCheckout -Pci
      • For enterprise: mvn release:perform -DlocalCheckout -DskipTests -Pci,hsqldb,jetty -Darguments='-Pci,hsqldb,jetty -DskipTests'
      • For manager: mvn release:perform -DlocalCheckout -DskipTests -Pmysql -Darguments='-Pmysql -DskipTests'
    • Delete the release branch: git checkout master ; git branch -D release-x.y
      • Example for platform: git checkout master ; git branch -D release-2.6-rc-1
    • Release the versions in JIRA
  • Edit the Release Notes to add the API breakage. To do so:
    • 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
      $ mvn clirr:check -DfailOnError=false -DtextOutputFile=clirr-result.txt
      $ find . -name clirr-result.txt | xargs cat | grep ERROR | sed -r -e 's/(ERROR: [0-9]+: )|(\s+$)//g'
      $ find . -name clirr-result.txt -delete
    • 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
  • Write the release notes
    • For each item in the release notes, ensure that there's a corresponding documentation update or addition on xwiki.org
  • Upload the files referenced on the Download page to XWiki's OW2 forge project
    ssh [email protected]
    cd public_html/releases/org/xwiki/enterprise/
    alias ow='/home/maven/ow.sh <YourUserName>'
    ow xwiki-enterprise-installer-windows/<ReleasedVersion>/xwiki-enterprise-installer-windows-<ReleasedVersion>.exe
    ...
  • Update the Download page on xwiki.org with the new links to OW2 and post a news announcement on OW2
  • Write an announcement blog post on xwiki.org
  • Tweet the Blog post using the XWiki.org account (ask Vincent if you need the credentials) and using the format: XWiki Enterprise <N> has been released! Check it out: <URL to Blog post on xwiki.org>
  • Update the Javadoc page to link to the new javadoc
  • Send an announcement email on the XWiki mailing lists (devs and users)
  • Updates sites about XWiki releases:
  • Update myxwiki.org with the new version. This is to test the stability of the release and find problems on a real farm.
  • Enjoy some rest and pray that nobody discovers a blocking bug... emoticon_smile
  • Start improving the build so that next time all this is done in mere seconds and automatically...

Publish to Maven Central

XWiki Commons and XWiki Rendering need to be published to Maven Central. To do so we use Sonatype's sync. The strategy is to upload to the XWiki Staging repo on Sonatype's Nexus, to check the staged repo and then to promote it.

In order to be able to upload to Sonatype's Nexus you'll need to create an account on http://issues.sonatype.org

  • Add the following in your settings.xml:
       <server>
        <id>sonatype-nexus-staging</id>
        <username>userid</username>
        <password>password</password>
      </server>
  • Add passphrase in settings.xml or pass it on command line using -Dgpg.passphrase=...:
    ...
       <profile>
         <id>xwiki</id>
         <properties>
           <gpg.passphrase>password</gpg.passphrase>
         </properties>
    ...
     
  • in xwiki-commons and in xwiki-rendering, after having checked out the correct tag, run:
     mvn clean deploy -Prelease,legacy,integration-tests -DaltDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2

    For XWiki < 4.1:

    mvn clean deploy -Prelease,legacy,ci -DaltDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2
  • Then log in https://oss.sonatype.org/ and perform the release steps as indicated on Sonatype's synchro doc.

Releasing XEclipse

TODO

XEclipse moved to github, update documentation accordingly.

Due to some difficulties in integrating Eclipse PDE Builds and Maven, XEclipse uses a different release process:

  1. Set version numbers to release version in pom.xml and MANIFEST.MF files.
  2. Create SVN tag for the version to be released.
  3. Compile and deploy XEclipse plugin: mvn deploy -DeclipseInstall=${eclipseDir}
  4. 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
  5. Perform release on Jira
  6. Upload the generated artifacts to the Objectweb Forge.
  7. Update wiki pages and download links.
  8. Post annoucements on mailing lists.
  9. Create blog post.
  10. Set version numbers in pom.xml and MANIFEST.MF files to next version-SNAPSHOT.

Tips and Troubleshooting

  • If Maven fails when you run release:prepare run first mvn clean install.
  • 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
  • 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.
  • 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. A workaround is to store your password in clear text in your subversion configuration files. 

Announcement Email Example

The XWiki development team is pleased to announce the release of XWiki Enterprise 1.2 RC 3.

Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download

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.

Changes from 1.2RC2:

    * XWIKI-1993: Database schema update issue when migrating from XE 1.1.2 to 1.2 RC2 on Oracle 10g
    * XWIKI-1995: Error inserting NULL values in NOT-NULL fields under Oracle for Version Comments/Authors
    * XWIKI-1975: Exception displayed in the log when upgrading from a previous 1.2 release to 1.2 RC2
    * XWIKI-1979: FileUploadPlugin should not call cleanFileList in endRendering
    * XWIKI-1981: UI issue when using the new rights managements UI with IE7
    * XWIKI-1946: Attachment renaming in the WYSIWYG Editor doesn't keep the file extension
    * XE-175: Show the "delete" button next to members in the group only when the group is edited

For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWikiEnterprise401

Thanks
-The XWiki dev team

Older commands to perform a release

These commands have now been superseded by the automated release script defined at the top of this document.

Updating Translations

These commands or something very much like them should work for updating translations.
NOTE: Since I run firefox as a different user, my downloads end up in /home/firefox/Desktop, change accordingly for your setup.

export BRANCH=<branch you are committing against>

cd /home/firefox/Desktop/
su firefox
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

In firefox goto:
http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.XWikiCoreResources&app=XE
http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.MainWebHome&app=XE
http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.SandboxWebHome&app=XE
http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XE.XWikiXWikiSyntax&app=XE
http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.XEMtranslations&app=XEM
http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.WikiManager&app=XEM
http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.ApplicationManager&app=XEM
http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=XEM.XEMWebHome&app=XEM
http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=Wysiwyg.Stringsproperties&app=Wysiwyg
http://l10n.xwiki.org/xwiki/bin/view/L10NCode/GetTranslationFile?name=Wysiwyg.WidgetResources&app=Wysiwyg
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


cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/
git co $BRANCH ; git reset --hard ; git clean -dxf ; git pull
cp /home/firefox/Desktop/XE_XE.XWikiCoreResources.zip ./
unzip -o XE_XE.XWikiCoreResources.zip ; rm XE_XE.XWikiCoreResources.zip


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/
cp /home/firefox/Desktop/Wysiwyg_Wysiwyg.Stringsproperties.zip ./
unzip -o Wysiwyg_Wysiwyg.Stringsproperties.zip ; rm ./Wysiwyg_Wysiwyg.Stringsproperties.zip


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/
cp /home/firefox/Desktop/Wysiwyg_Wysiwyg.WidgetResources.zip ./
unzip -o Wysiwyg_Wysiwyg.WidgetResources.zip ; rm ./Wysiwyg_Wysiwyg.WidgetResources.zip


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/
cp /home/firefox/Desktop/Wysiwyg_Wysiwyg.WYSIWYGEditorCoreParametrizedResources.zip ./
unzip -o ./Wysiwyg_Wysiwyg.WYSIWYGEditorCoreParametrizedResources.zip ; rm ./Wysiwyg_Wysiwyg.WYSIWYGEditorCoreParametrizedResources.zip


cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-wiki-manager/xwiki-platform-wiki-manager-ui/src/main/resources/
cp /home/firefox/Desktop/XEM_XEM.WikiManager.zip ./
unzip -o ./XEM_XEM.WikiManager.zip ; rm ./XEM_XEM.WikiManager.zip


cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/xwiki-platform-core/xwiki-platform-application-manager/xwiki-platform-application-manager-ui/src/main/resources/
cp /home/firefox/Desktop/XEM_XEM.ApplicationManager.zip ./
unzip -o ./XEM_XEM.ApplicationManager.zip ; rm ./XEM_XEM.ApplicationManager.zip


cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-manager/xwiki-manager-applications/xwiki-manager-application-xem/src/main/resources/
git co $BRANCH ; git reset --hard ; git clean -dxf ; git pull
cp /home/firefox/Desktop/XEM_XEM.XEMWebHome.zip ./
unzip -o ./XEM_XEM.XEMWebHome.zip ; rm ./XEM_XEM.XEMWebHome.zip
cp /home/firefox/Desktop/XEM_XEM.XEMtranslations.zip ./
unzip -o ./XEM_XEM.XEMtranslations.zip ; rm ./XEM_XEM.XEMtranslations.zip


cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-enterprise/xwiki-enterprise-wiki/src/main/resources/
git co $BRANCH ; git reset --hard ; git clean -dxf ; git pull
cp /home/firefox/Desktop/XE_XE.XWikiXWikiSyntax.zip ./
unzip -o ./XE_XE.XWikiXWikiSyntax.zip ; rm ./XE_XE.XWikiXWikiSyntax.zip
cp /home/firefox/Desktop/XE_XE.SandboxWebHome.zip ./
unzip -o ./XE_XE.SandboxWebHome.zip ; rm ./XE_XE.SandboxWebHome.zip
cp /home/firefox/Desktop/XE_XE.MainWebHome.zip ./
unzip -o ./XE_XE.MainWebHome.zip ; rm ./XE_XE.MainWebHome.zip

git add . ; git commit  -m "[release] Updated translations." ; git push
cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-manager/
git add . ; git commit  -m "[release] Updated translations." ; git push
cd ~/wrk/xwiki.git/xwiki-trunks/xwiki-platform/
git add . ; git commit  -m "[release] Updated translations." ; git push

Releasing

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

# Notes:
`pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION <-- this gives you the tag name, something like xwiki-rendering-3.1-milestone-2

Release naming conventions:
xwiki-enterprise-2.4.2             - Bugfix release
xwiki-enterprise-3.0-milestone-1   - Milestone release
xwiki-enterprise-2.7-rc-1          - Release Candidate release
xwiki-enterprise-3.0-SNAPSHOT      - Snapshot


Preparation:
<bring agent offline with jenkins>
cp ~/.gitconfig.cjdelisle ~/.gitconfig
export VERSION=<release version number>
export BRANCH=<branch name>
on localhost: export VERSION=<release version number>
on localhost: export BRANCH=<branch name>
cat /home/hudsonagent/.ssh/id_dsa.pub
<add key to github>

cd releases/xwiki-trunks/xwiki-commons/
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
cd ../xwiki-rendering
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
cd ../xwiki-platform
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
cd ../xwiki-enterprise
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
cd ../xwiki-manager
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


Commons:
cd ../xwiki-commons
# NOTE: As of 3.2, there is a new line in pom.xml which must be changed.
# <commons.version>3.2-SNAPSHOT</commons.version> needs to reflect the current version.
mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DautoVersionSubmodules=true -DreleaseVersion=$VERSION
mvn release:perform -DpushChanges=false -DlocalCheckout=true
git push
git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
<do signed tag on local>
git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION


Rendering:
cd ../xwiki-rendering/

## this is dangerous, find a better way!
#mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION

# no longer needed
#ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh

git commit -a -m "[release] changed version numbers to $VERSION"
mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DautoVersionSubmodules=true -DreleaseVersion=$VERSION
mvn release:perform -DpushChanges=false -DlocalCheckout=true
git push
git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
<do signed tag on local>
git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION

Platform:
cd ../xwiki-platform/

## this is dangerous, find a better way!
#mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION

# no longer needed
#ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh

git commit -a -m "[release] changed version numbers to $VERSION"
mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DreleaseVersion=$VERSION -DautoVersionSubmodules=true -Pci
mvn release:perform -DpushChanges=false -DlocalCheckout=true
git push
git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
<do signed tag on local>
git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION

Enterprise:
cd ../xwiki-enterprise/
## this is dangerous, find a better way!
#mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION

# no longer needed
# ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh

git commit -a -m "[release] changed version numbers to $VERSION"
mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DreleaseVersion=$VERSION -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish -Darguments="-N"
mvn release:perform -DpushChanges=false -DlocalCheckout=true -Pci,hsqldb,jetty -DskipTests -Darguments='-Pci,hsqldb,jetty -DskipTests'
git push
git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
<do signed tag on local>
git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
# Get the hashes of the released files:
find ./ -name "xwiki-enterprise-installer-generic-$VERSION-standard.jar" -exec sha1sum {} \;
find ./ -name "xwiki-enterprise-installer-windows-$VERSION.exe" -exec sha1sum {} \;
find ./ -name "xwiki-enterprise-jetty-hsqldb-$VERSION.zip" -exec sha1sum {} \;
find ./ -name "xwiki-enterprise-web-$VERSION.war" -exec sha1sum {} \;
find ./ -name 'xwiki-enterprise-wiki.xar' -exec sha1sum {} \;

Manager:
cd ../xwiki-manager/
## this is dangerous, find a better way!
#mvn versions:update-parent -DgenerateBackupPoms=false -DparentVersion=$VERSION

# no longer needed
ls pom.xml | sed "s/^\(.*\)$/cat \1 | sed \'s\/\\\\\${project\\.version}\/$VERSION\/g\' > \1.tmp ; mv \1.tmp \1/" | sh

git commit -a -m "[release] changed version numbers to $VERSION"
mvn release:prepare -DpushChanges=false -DlocalCheckout=true -DreleaseVersion=$VERSION -DautoVersionSubmodules=true -Pci,hsqldb,mysql,pgsql,derby,jetty,glassfish -Darguments="-N"
mvn release:perform -DpushChanges=false -DlocalCheckout=true -Pmysql -Darguments='-Pmysql'
git push
git cat-file -p `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
<do signed tag on local>
git tag -d `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
# Get the hashes of the released files:
find ./ -name '*.war' -exec sha1sum {} \;
find ./ -name '*.xar' -exec sha1sum {} \;
find ./ -name '*.zip' -exec sha1sum {} \;


Teardown:
mv /home/hudsonagent/.gitconfig.default /home/hudsonagent/.gitconfig
<remove agent key from github>
<bring agent offline with jenkins>


Signed Tagging On localhost:
git pull
git checkout <sha1>
git tag -u 0x65B209D6 `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION -m "Releasing XWiki $VERSION"
# 0x65B209D6 == key id, if your email is right then -s might work instead
git show `pwd | sed 's/.*\/\([^\/]*\)$/\1/'`-$VERSION
# make sure everything looks right
git push --tags
Tags:
   

Get Connected