Skip to content

Release instructions

Josh Guilfoyle edited this page Sep 1, 2015 · 18 revisions

Select a version

Stetho releases follow the <major>.<minor>.<micro> versioning scheme where major version numbers denote substantial rewrites or major architectural shifts, minor versions represent new features or major bug fixes, and micro versions for bug fixes or small maintenance releases.

The previous maintainer expected the next release to be specified in gradle.properties, suffixed with -SNAPSHOT. This is merely a hint as to what the next version might be, actual features landed may cause this version number to change. It is acceptable for the -SNAPSHOT version to be decremented.

Smoke test

  1. Make sure the full project builds:

./gradlew check connectedCheck ```

  1. Smoke test the sample app:

./gradlew installDebug ```

  1. If there are problems, abort the process and correct.

Release to GitHub

  1. Make sure you have upstream and origin remotes setup properly:

git remote -v

origin [email protected]:jasta/stetho.git (fetch) origin [email protected]:jasta/stetho.git (push) upstream https://github.com/facebook/stetho.git (fetch) upstream https://github.com/facebook/stetho.git (push) ```

  1. Update to the latest code locally:

git checkout master

git remote update upstream

git reset --hard upstream/master

```
  1. Sanity check by making sure the top commit is reasonably up-to-date:

git show HEAD


1. Start a release branch:

git checkout -b release-vX.Y.Z


1. Modify `CHANGELOG.md` by manually looking at changes from the previous release (typically the commits starting with "Merge pull request" provide sufficient information).

git log --format=oneline vX.Y.z..

[ edit CHANGELOG.md accordingly ]

git commit -m 'Update CHANGELOG.md to vX.Y.Z'


1. Modify all `README.md` to reflect the new version (the old version appears multiple times and there may be multiple files using them!).

1. Modify `gradle.properties` to cause the new version to be picked by by Maven/Gradle (make sure to drop `-SNAPSHOT`!):

VERSION_NAME=X.Y.Z


1. Officially bump the version:

git commit -m 'Bump version to X.Y.Z'

git tag vX.Y.Z # note the 'v'!


1. Prepare a PR representing the release changes (note `--tags`!):

git push --tags -u origin release-vX.Y.Z


1. Create the final release artifacts:

./gradlew assemble


1. If there are problems, correct on a different branch with different PRs and then merge them into the release branch!

1. Officially create the PR on github and merge.

1. Go to https://github.com/facebook/stetho/releases and click "Draft a new release".

1. Associate the release to the tag you've now merged, use the title "Release X.Y.Z", leave the description section empty.

1. Attach the following JARs built locally:
 ```
stetho-X.Y.Z-fatjar.jar
stetho-X.Y.Z.jar
stetho-okhttp-X.Y.Z.jar
stetho-timber-X.Y.Z.jar
stetho-urlconnection-X.Y.Z.jar
stetho-js-rhino-X.Y.Z.jar
 ```

# Release to Maven Central

TODO!

# Further reading

The release and branching strategy that Stetho uses is based on: http://nvie.com/posts/a-successful-git-branching-model/

Integrating Stetho

Clone this wiki locally