...
Code Block | ||||
---|---|---|---|---|
| ||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <!-- To publish a snapshot --> <server> <id>apache.snapshots.https</id> <username>YOUR_APACHE_ID</username> <password>YOUR_APACHE_PASSWORD</password> </server> <!-- To stage a release --> <server> <id>apache.staging.https</id> <username>YOUR_APACHE_ID</username> <password>YOUR_APACHE_PASSWORD</password> </server> </servers> <server> <server> <id>apache.releases.https</id> <username>YOUR_APACHE_ID</username> <password>YOUR_APACHE_PASSWORD</password> </server> </servers> <profiles> <profile> <id>apache-release</id> <properties> <!-- gpg --list-keys will show you your keyname ( something like 00A5F21E) --> <gpg.keyname>YOUR_KEYNAME</gpg.keyname> <gpg.passphrase>YOUR_KEY_PASSWORD</gpg.passphrase> </properties> </profile> </profiles> </settings> |
...
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 VERSION=X.Y.Z NEWVERSION=X.Y.(Z+1) BRANCH_NAME=branch-$VERSION REMOTE=origin git branch $BRANCH_NAME git push $REMOTE $BRANCH_NAME
Update to next SNAPSHOT version
Code Block language xml mvn clean org.codehaus.mojo:versions-maven-plugin:2.7:set -DgenerateBackupPoms=false -DnewVersion=$NEWVERSION-SNAPSHOT
Also update the version number in zookeeper-client/zookeeper-client-c/configure.ac, zookeeper-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)Code Block cd zookeeper-client/zookeeper-client-c sed -i s/$VERSION/$NEWVERSION/g configure.ac sed -i s/$VERSION/$NEWVERSION/g CMakeLists.txt cd ../.. grep -r $NEWVERSION *
- 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.Z
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.Y. If 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 language xml :%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 language xml mvn clean org.codehaus.mojo:versions-maven-plugin:2.7:set -DgenerateBackupPoms=false -DnewVersion=$VERSION
Make sure the version number is correct in zookeeper-client/zookeeper-client-c/configure.ac, zookeeper-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 language xml # 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
If you have issues signing the tag, refer to this gist.
- In Jira, move open issues to next version. Disable mail notifications for this bulk change.
...