Skip to content

How to release (old)(manual)

Roman Ivanov edited this page Nov 9, 2019 · 1 revision

This page describes the process to release a new eclipse-cs version.

Preconditions:

  • eclipse-cs Git repo is cloned
  • eclipse-cs projects are imported into an Eclipse workspace (PDE recommended)
  • project can be built locally with Maven
  • all PRs intended for the release have been merged to master

Prepare and test release build

  1. Check out eclipse-cs master branch. Prepare env variables:
    PREV_RELEASE=$(xmlstarlet sel -N pom=http://maven.apache.org/POM/4.0.0 \
           -t -m pom:project -v pom:version pom.xml | sed "s/-SNAPSHOT//")
    
    set variable export RELEASE=8.XX.0 to planned/new release version.
  2. Update the plugin/project versions to the new target version. Run mvn tycho-versions:set-version -DnewVersion="${RELEASE}-SNAPSHOT" in root directory.
  3. Search workspace for remaining references to the previous release version, likely the source feature in net.sf.eclipsecs-updatesite/category.xml will need to be updated
  4. Update net.sf.eclipsecs.doc/src/main/resources/partials/index.html to reflect new release version and potentially the upgraded Checkstyle core version
    sed -i "s/Latest release ${PREV_RELEASE}/Latest release ${RELEASE}/" net.sf.eclipsecs.doc/src/main/resources/partials/index.html
    sed -i "s/based on Checkstyle ${PREV_RELEASE%.*}/based on Checkstyle ${RELEASE%.*}/" net.sf.eclipsecs.doc/src/main/resources/partials/index.html
    
  5. Create a new release notes partial page under net.sf.eclipsecs.doc/src/main/resources/partials/releases/ and fill it accordingly.
    mkdir net.sf.eclipsecs.doc/src/main/resources/partials/releases/${RELEASE}
    cp -r net.sf.eclipsecs.doc/src/main/templates/release_notes.html \
      net.sf.eclipsecs.doc/src/main/resources/partials/releases/${RELEASE}
    
    git log --pretty=oneline --abbrev-commit $(git rev-list --tags --max-count=1)..HEAD    | grep -vE "minor|doc|config|maven-release-plugin" | sed 's/^....... //' | sed 's/^/        <li>/g' | sed 's/$/<\/li>/g' > /tmp/release-notes-content.txt
    sed -i -e "/###CONTENT###/r /tmp/release-notes-content.txt" -e '/###CONTENT###/d' net.sf.eclipsecs.doc/src/main/resources/partials/releases/${RELEASE}/release_notes.html
    # do manual modification of file or verify content
    
  6. Add the new release notes page in net.sf.eclipsecs.doc/src/main/resources/releases.json. Only set the latest few releases to "initially opened".
    cat <<EOT > /tmp/add-to-release.json
      {
        "version": "Release ${RELEASE}",
        "template": "partials/releases/${RELEASE}/release_notes.html",
        "open": true
      },
    EOT
    sed -i "/\[/r /tmp/add-to-release.json" net.sf.eclipsecs.doc/src/main/resources/releases.json
    
  7. Build eclipse-cs locally, run mvn package in root directory - this will also update the website content in project root docs
  8. Test installation and basic functionality of the update site archive net.sf.eclipsecs-updatesite/target/net.sf.eclipsecs-updatesite_X.X.X.YYYYmmDDHHMM.zip

Deploy binaries to bintray

Requires permissions on Bintray to the eclipse-cs organisation

Requires setup in your Maven settings.xml (see below)

  1. Make sure you have the bintray profile and API key in your settings.xml.
  2. Run mvn deploy -Pbintray in the project root (takes about 8 min)
  3. Go to https://bintray.com/eclipse-cs/eclipse-cs/update-site-archive (Files tab -> go to latest page in pagination, find folder "update-site-archive") , find recent uploaded file and add the update site archive file to the download list (most right column "Actions" -> "Show in download list")

Commit/Push local changes to master

  1. Commit/Push local changes to Git master branch, this will also publish the project website (docs folder)
git add .
git commit -m "config: release ${RELEASE}"
git push origin master
  1. Create release tag on latest commit, push tag to origin:
git tag $RELEASE
git push origin --tags
  1. close milestone at https://github.com/checkstyle/eclipse-cs/milestones and create new milestone
  2. Open at https://github.com/checkstyle/eclipse-cs/releases latest tag, press "Edit Tag", put in Description link https://checkstyle.org/eclipse-cs/#!/releasenotes press "Publish Release".

Update Eclipse Marketplace listing

Requires permission for the listing

This is needed to make the new version visible and installable via the Eclipse Marketplace

  1. Go to https://marketplace.eclipse.org/content/checkstyle-plug, Log in
  2. Press "Edit", update version number or other information as necessary, press "Save"

Test installations

  1. Uninstall eclipse-cs from Eclipse and re-install via Eclipse Marketplace
  2. Uninstall eclipse-cs and re-install via update site: https://checkstyle.org/eclipse-cs/update