Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Check out the branch you are making the release of:

    Code Block
    git clone -b branch-X.Y https://gitbox.apache.org/repos/asf/zookeeper.git


  • If you are creating a point release (almost always the case) then follow this step. The exception to this is typically only when creating a new release candidate because the previous candidate failed during voting (rc0 failed and you are creating rc1+) – in which case skip this step.

    Create a branch for X.Y.Z (the current release candidate)

    Code Block
    git branch branch-X.Y.Z
    git push <remote> branch-X.Y.Z


  • Update to next SNAPSHOT version

    Code Block
    languagexml
    mvn clean org.codehaus.mojo:versions-maven-plugin:2.7:set -DgenerateBackupPoms=false -DnewVersion=X.Y.(Z+1)-SNAPSHOT


    Also update the version number in zookeeper-client/zookeeper-client-c/configure.aczookeeper-client/zookeeper-client-c/CMakeLists.txt, and zookeeper-client/zookeeper-client-c/include/zookeeper_version.h to the next logical SNAPSHOT version (e.g. X.Y.Z to X.Y.(Z+1)-SNAPSHOT)

  • Do a search in the project for the version with the attached -SNAPSHOT to make sure it is changed everywhere. Some files (other than pom.xml) might also contain a hard coded version.


  • Commit these changes.

    Code Block
    # check for modified files
    git status
    
    # add modified files one by one
    git add <modified files>
    
    # commit and push the changes to remote repo branch-X.Y
    git commit -m "Prepare for the next release: update the version to X.Y.(Z+1)-SNAPSHOT"
    git push <remote> branch-X.Y


  • Checkout the active point release branch - this is where you will be creating the release candidate

    Code Block
    git checkout branch-X.Y.Z


  • If not already done, cherry-pick desired commits into branch-X.Y.Z. If cherry-picks are done from other than branch-X.Y ensure that those changes are also committed to branch-X.YIf there are conflicts, then it is preferable to produce a new patch for this branch, review it separately and commit it via JIRA. Please refer HowToContribute and Committing changes page for pushing changes to the project. 

    Code Block
    # The -x option records the source commit, and reuses the original commit message
    git cherry-pick -x <commit-hash>


  • Update zookeeper-docs/src/main/resources/markdown/releasenotes.md with release notes for this release. You can get the HTML by following the "Release Notes" link for the relevant release on the https://issues.apache.org/jira/browse/ZOOKEEPER?report=com.sourcelabs.jira.plugin.portlet.releases:releases-projecttab#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel tab in Jira. Note that you need to exclude the won't fix or invalid tickets.
    Hints for editing releasenotes.md (using vim) - you can skip 'c' parameter, it tells vim to ask for all replacement:

    Code Block
    languagexml
    :%s/<\/h2>//gc
    :%s/<li>\[<a href='\(.*\)'>\(ZOOKEEPER-[0-9]\+\)<\/a>\] - \+/* [\2](\1) - /gc
    :%s/<\/li>\n//gc


  • Update versions in pom.xml (remove SNAPSHOT):

    Code Block
    languagexml
    mvn clean org.codehaus.mojo:versions-maven-plugin:2.7:set -DgenerateBackupPoms=false -DnewVersion=X.Y.Z

    Make sure the version number is correct in zookeeper-client/zookeeper-client-c/configure.aczookeeper-client/zookeeper-client-c/CMakeLists.txt, and zookeeper-client/zookeeper-client-c/include/zookeeper_version.h 

  • Update the version number in build.xml to be ''X.Y.Z'' (i.e. remove SNAPSHOT designator)
  • Update the copyright years in NOTICE.txt if it's outdated.
  • Commit these changes.

    Code Block
    languagexml
    # check for modified files
    git status
     
    # add modified files one by one
    git add <modified files>
      
    # commit and push the changes to remote repo branch-X.Y
    git commit -m "Preparing for release X.Y.Z"
    git push <remote> branch-X.Y.Z


  • Run spotBugs and rat cheks:

    Code Block
    mvn clean apache-rat:check
    mvn clean install -DskipTests spotbugs:check


  • Tag the release candidate (R is the release candidate number, and starts from 0):

    Code Block
    # create a signed tag
    git tag -s release-X.Y.Z-rcR -m "ZooKeeper X.Y.Z-rcR release."
     
    # push the newly created rc tag to the remote repo.
    git push <remote> release-X.Y.Z-rcR


  • In Jira, move open issues to next version. Disable mail notifications for this bulk change.

...