General

Components

Community

Development

TDF

Release Guide

We are doing two kind of releases at the same time:

  1. One Maven release with the artefacts of each project.
  2. One GitHub release bundling artefacts of the ODF Toolkit as ZIPs.

Maven Release Guide

The release artifacts for each project are deployed to the Maven repository. Making release artefacts should follow the following steps:

Only once your configuration Setup

  1. Maven Repro Access
    Make sure you have access to Maven repro via our Sonatype JIRA issue. Add your userID & password to your local <USER_HOME>/.m2/settings.xml. In the end, you should be able to log in at https://oss.sonatype.org/#welcome.

  2. Install GNU PG
    Install in your OS. See details in tutorial 'publish your artifacts to Maven'

  3. Configure GNU PG
    Add your GNU and JIRA credentials to your local <USER_HOME>/.m2/settings.xml. See our example settings.xml and search & replace the placeholders starting with 'YOUR_'.

Recipe for every release

There are two kinds of releases a quick SNAPSHOT release, where the SNAPSHOT will be exchanged by a timestamp or the final release.

Snapshot Release

  1. Deploy Snapshot

    mvn deploy
    

Final Release

  1. Prepare documentation
    Working on a release git branch and using a GitHub fork to test the new GitHub pages helps a lot!

    git checkout -b release-candidate
    

    The following documents need currently manual adjustment:

    ./README.md
    ./src/site/content/odftoolkit_website/ReleaseNotes.mdtext
    ./src/site/content/odftoolkit_website/downloads.mdtext
    

    The mdtext files are being converted to HTML doing (on Linux)

    cd src/site
    build-html.sh
    git add ../..
    git commit -m"Documentation update for the upcoming release"
    
  2. Prepare JavaDoc

    JavaDoc has to be generated with the upcoming release number already set. Therefore instead of doing it manually I do a

    mvn release:prepare # should generate the javadoc - otherwise 'mvn install'
    git stash # to remove the changed pom.xml
    cd src/site
    copy-javadoc.sh
    git add ../..
    git commit -m"New JavaDoc for the upcoming release"
    
  3. A clean start
    Make sure that your working copy is clean. Preferably check out a clean version from GitHub.

    mvn clean
    mvn release:clean
    
  4. Prepare the release

    mvn release:prepare
    

    This will start the interactive release preparation. You need to supply Maven with the versions of the release. "release version" should be the version of the intended release (recommended value should be fine). "SCM release tag or label" should include the RC version (e.g. odftoolkit-0.10.0). "new development version" should be the current SNAPSHOT version.

  5. Perform the release

    mvn release:perform
    

    This will checkout the tag to the target directory, build and package everything and upload the artifacts to the staging repository. Users will download the mirrored release artifacts from machines outside TDF control. Users need to verify that the copy downloaded is identical to the original. Mirrored copies of checksums, KEYS and signature files (.asc and .md5 files) will be present on the mirrors but must never be used for verification. So, all links from the podling website to signatures, sums and KEYS need to refer to the original documents on GitHub. See release signing guide for more information.

  6. Add the Git tag manually after branch rebase Push the branch and if the branch is rebased the tag has to be added and pushed on the correct commit manually. For instance for 0.11.0 release the git commands looked like:

    • Adding tag (signed -s, annotated -m, previous commit -a)
    git tag -s -a v0.11.0 4baf275b33 -m"odftoolkit-0.11.0"
    git push origin v0.11.0
    
    • Deleting tag
    git tag -d v0.11.0
    git push origin --delete v0.11.0
    
  7. What to Do If Something Goes Wrong

    • Step 1: Undo the release:
    git reset –hard HEAD~1 (Depending upon when the error occurred, you might undo multiple commits)
    
    • Step 2: Delete the tag.
    git tag -d tagName
    git push origin :refs/tags/tagName
    
  8. Review and approve the Maven Nexus Deliverables

    Log into https://oss.sonatype.org/#welcome and review the artefacts of the release, if it is erroneous drop it.

    1. If the release artefacts are correct, close the repository.
    2. After the closing process is done, you may release the repository.
    3. You may find the artefacts of the release among on Maven, e.g.: https://repo1.maven.org/maven2/org/odftoolkit/odftoolkit/
  9. Publish Document
    Publish all of the prepared document on the website and update the download page.

  10. Send Announcements
    The release manager need to send announcements to odf-dev list. The sample looks like:

       Subject:[ANNOUNCEMENT] "ODF Toolkit 0.11.0 Release"
       To: dev@odftoolkit.org
       Hi all,
    
       The ODF Toolkit team is pleased to announce the release of 0.11.0 (>=JDK 11) supporting ODF 1.2.
       The list of changes is available in the release notes[1].
    
       All new ODF Toolkit components (binary, source and JavaDoc bundles) are available as GitHub releases [2].
       Or in the central Maven repository under group ID "org.odftoolkit" and version "0.11.0" [3,4,5].
    
       [1] ./ReleaseNotes.html
       [2] https://github.com/tdf/odftoolkit/releases/tag/v0.11.0
       [3] https://repo1.maven.org/maven2/org/odftoolkit/odfdom-java/0.11.0/
       [4] https://repo1.maven.org/maven2/org/odftoolkit/odfvalidator/0.11.0/
       [5] https://repo1.maven.org/maven2/org/odftoolkit/xslt-runner/0.11.0/
    

Manual GitHub Release Guide

NOTE: This manual is just a fallback in case the automatic upload to GitHub does not work correctly. We have added a deployment GitHub action, that is being triggered, whenever a tag is being added, see see https://github.com/tdf/odftoolkit/blob/master/.github/workflows/deployment.yml

The Six Release Artefacts (downloadable from GitHub)

The GitHub release has always six files:

Creating Release Artefacts

  1. Call from the ODF TOOLKIT base via command line:

    mvn clean
    
  2. Call from the ODF TOOLKIT base via command line one of the following.

    mvn install -Ppedantic
    mvn install -Ppedantic > mylogFile.txt 2>&1*
    

    NOTE: The option pedantic checks if all files have either a valid license header or an explicit exception. Often helpful for reviewing the build output is redirecting it into an own logfile.

  3. You might want to update the website to announce the release.

Bundling Release Artefacts:

  1. Test the JARs if they are working and if the documentation is correct, esp. JavaDoc references to ODF elements, attributes and units have been created correctly by our JavaDoc taglet project.

  2. If all project artefacts have been created without an error, they can be bundled into ZIPs and signed via:

    mvn antrun:run@prepare-github-release -Pprepare-release
    

The output will be created in the directory: 'ODF_TOOLKIT_BASE/target/release/'.

NOTE: Don't forget to check if the ZIPs of the result directory have the correct content.

Upload of the 6 Release Artefacts

  1. Browse to our GitHub release page.
  2. Press the "Draft a new release" button (or ask for access rights on the mailing list if not visible).
  3. Upload all 6 files from the release and name it like "'odftoolkit-' + version", for instance: odftoolkit-8.0.0-RC2

References

  1. How to Publish Your Artifacts to Maven Central

Impressum (Legal Info) | Privacy Policy (Datenschutzerklärung) | Statutes (non-binding English translation) - Satzung (binding German version) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Apache License, v2.0. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License v2.0. “LibreOffice” and “The Document Foundation” are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy. LibreOffice was based on OpenOffice.org.