Versions Compared

Key

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

...

Code Block
RC_NUM=0
BRANCH_NAME=branch-3.6
BRANCH_VERSION=3.6.0-SNAPSHOT
RELEASE_DEVELOPMENT_VERSION=3.6.1-SNAPSHOT
RELEASE_VERSION=3.6.0
MASTER_DEVELOPMENT_VERSION=3.7.0-SNAPSHOT
TAG=release-$RELEASE_VERSION-$RC_NUM


git checkout master
git pull --rebase
git clean -xdf
mvn release:clean
mvn release:branch \
    -DbranchName=$BRANCH_NAME \
    -DdevelopmentVersion=$MASTER_DEVELOPMENT_VERSION \
    -Pfull-build

That command will:

  • change the version in master branch
  • create a new release branch

...

Code Block
git clean -xdf
# perform quality checks
mvn clean apache-rat:check -DskipTests -Pfull-build
mvn clean install checkstyle:check spotbugs:check -DskipTests -Pfull-build
# run tests
mvn clean install -Pfull-DskipTestsbuild

Perform a release on branch (for major and minor release)

Code Block
git checkout $BRANCH_NAME
git clean -xdf

mvn release:prepare \
   -DautoVersionSubmodules=true  \
   -DreleaseVersion=$RELEASE_VERSION \
   -Dtag=$TAG  \
   -DdevelopmentVersion=$RELEASE_DEVELOPMENT_VERSION \
   -Darguments='-DskipTests=true -Pfull-build,apache-release' \
   -Pfull-build,apache-release

...

  • 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 

  • 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-X
    git commit -m "Preparing for release $VERSION"
    git push <remote> branch-X.Y.Z


  • Run spotBugs, checkstyle and rat checks:

    Code Block
    git clean -xdf
    mvn clean apache-rat:check -DskipTests -Pfull-build
    mvn clean install checkstyle:check spotbugs:check -DskipTests -Pfull-build

    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.

...