How To Make A LanguageTool Release

This is our internal documentation for how to make a new release. This is only relevant to release managers. Also see Roadmap.

How to enter Feature Freeze

  • languagetool-community-website:
    • ./i18n_update.sh
  • in languagetool-standalone/scripts:
    • ./i18n_update.sh
  • send an email to the forum about the code freeze:
  • ask people to test the snapshots on twitter and in the forum
  • run more tests locally to catch exceptions (locally for dnaber: /media/Data/languagetool/regression-test/*.sh)
  • build the ZIPs and see how much bigger they have become compared to the latest release
  • optionally, run checkurl.bash to fix old URLs

How to make a LanguageTool release

We build artifacts with Maven and upload them to oss.sonatype.org with a script, where they can then be released on Maven Central. Note that this is independent of the *.zip and *.oxt files we release. If there's a problem with the Sonatype-release for Maven Central (which is only relevant for Java developers), we can always make the release of the user artifacts (*.zip and *.oxt) and care about the other problems later.

Preparation

  • make sure you're on Java 1.8 (we support Java 1.8 and being on Java 1.8 is the easiest way to ensure that): java -version
  • update local source: git pull -r
  • work in a local branch: git checkout -b vX.Y-release
  • make sure licenses in languagetool-office-extension, languagetool-wikipedia, and languagetool-standalone are in sync (src/main/resources/third-party-licenses), except icons.txt:
    • diff -r languagetool-office-extension/src/main/resources/third-party-licenses languagetool-wikipedia/src/main/resources/third-party-licenses
    • diff -r languagetool-office-extension/src/main/resources/third-party-licenses languagetool-standalone/src/main/resources/third-party-licenses
  • update the i18n property files by running ./i18n_update.sh in languagetool-standalone/scripts
    • Daniel has the password for Transifex API (Daniel, Marcin, Dominique, and Markus have all admin rights at Transifex and can get the password)
  • Update the version number in:
    • JLanguageTool.VERSION in JLanguageTool.java
    • manifest.xml
    • description.xml
    • top-level pom.xml: only set property languagetool.version
    • all pom.xml files: mvn versions:set
    • commit changes
  • mvn clean test
  • ./build.sh languagetool-standalone package -DskipTests
    • test the result in languagetool-standalone/target/
    • also test testrules.sh and testrules.bat
    • check how much bigger the ZIP has become compared to the previous release
  • ./build.sh languagetool-wikipedia package -DskipTests
    • test the result in languagetool-wikipedia/target
  • ./build.sh languagetool-office-extension package -DskipTests
  • run org.languagetool.dev.RuleOverview and paste the result to languages/index.php
  • update CHANGES.md file
    • sort language changes alphabetically
    • make sure list of updated languages matches languages/index.php (but that covers 6 months, so check manually)
  • update README.md file
  • make sure there are no useless files (these would become part of the download file):
    • run git status and check the output under "untracked files"
    • make sure there are no *.bak files in resources

Now we're ready to create and upload the Maven artifacts. Details are at http://central.sonatype.org/pages/ossrh-guide.html:

Releasing the artifacts to Maven Central

  • mvn clean install
  • mvn javadoc:jar
  • mvn source:jar
  • cd languagetool-standalone/scripts
  • open the stage-artifacts.sh script
    • set the version number
    • make sure the list of Maven projects to be deployed is up-to-date
    • ./stage-artifacts.sh (this will sign and upload the artifacts to the staging area, this will take > 30 minutes)
  • log in at https://oss.sonatype.org
    • go to "Staging Repositories" page.
    • select the staging repository: orglanguagetool-xyz (usually at the bottom of the list)
    • click "Close"
    • test the artifacts in project languagetool-client-example:
      • adapt the pom.xml (set the new "orglanguagetool-xyz" as a repo and update the dependencies)
      • clean local m2 repo
      • run mvn clean package
      • unzip the uberjar and replace language-module.properties in META-INF with the language-module.properties from languagetool-standalone (this is needed because with the original .properties file, all languages except one get lost)
      • re-zip the directory and run the JAR, it should check a tiny English text fragment with all languages
    • if okay, click "Release" (requires a refresh) - note that once released, the artifacts cannot be deleted or modified! It may take a few hours before the artifacts actually become available.
  • set a tag in git: git tag -a vx.y -m 'version x.y'
  • push the tag: git push origin vx.y

Releasing the ZIP and OXT for end-users

  • check out the new tag from git and run mvn clean package
  • copy the stand-alone LT to a path with a space and test some sentences
  • upload to the server:
    • scp LanguageTool-3.x.zip LanguageTool-3.x.oxt LanguageTool/CHANGES.md LanguageTool/README.md gro.lootegaugnal|lootegaugnal#gro.lootegaugnal|lootegaugnal:languagetool.org/languagetool-website/www/download/

After the Release

  • git checkout vx.y-release
  • Set the new version (x.y-SNAPSHOT) in these files:
    • JLanguageTool.VERSION in JLanguageTool.java
    • manifest.xml
    • description.xml
    • property languagetool.version in top-level pom.xml (not version, the next command will take care of that)
    • all pom.xml files: mvn versions:set
    • commit
  • merge the branch back to trunk: git checkout master; git merge vx.y-release
  • update: git pull (not pull -r)
  • push your changes: git push

Update website

  • include/pages/download-buttons.php
  • link the release on the server:
    • cd ~/languagetool.org/languagetool-website/www/download/
    • rm LanguageTool-stable.oxt && ln -s LanguageTool-3.X.oxt LanguageTool-stable.oxt && rm LanguageTool-stable.zip && ln -s LanguageTool-3.X.zip LanguageTool-stable.zip
  • update roadmap at http://languagetool.wikidot.com/roadmap
  • enter the next feature freeze date in your personal calendar so you don't forget it
  • Javadoc
    • git checkout vx.y
    • run mvn javadoc:aggregate, then upload target/site/apidocs/ to server at ~/languagetool.org/languagetool-website/www/development/api - note: this requires a local "mvn install" first and(?) the release to be on Maven Central already, just wait if it isn't yet
    • git checkout master
  • set new version number in http://wiki.languagetool.org/java-api
  • set new version in languagetool.update.xml (this is linked in openoffice/description.xml and allows updating LT from within the LO/OO extension manager)
    • install the old version of LT in LibreOffice and see if the automatic update from extension manager works

Write announcements

API Server Update

No action is needed, the API gets re-deployed every day with the latest snapshot by create-snapshot.sh (unless there are test failures). To deploy it manually anyway, use ./deploy-api-server.sh in languagetool-standalone/scripts.

Update the web app at community.languagetool.org

  • Just update the LT dependencies in BuildConfig.groovy. Deployment happens automatically, the create-snapshot.sh script does this automatically every day.
  • Due to a bug, Tomcat doesn't restart automatically, so it needs to be restarted manually at 23:00 or so.

Backups and Misc

Not really related to a release, but should be done once in a while and the release is a good opportunity:

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License