Skip to content

Commit

Permalink
docs: Update release steps to integrate checklist and automate versio…
Browse files Browse the repository at this point in the history
…ning

* Separates bumping versions from releasing to add an inspection point
* Automates changelog update provided every entry is already in place
  and the `## TBD` heading is present
  • Loading branch information
kattrali committed May 31, 2018
1 parent 042ca30 commit 7ba6e2b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 53 deletions.
96 changes: 45 additions & 51 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,32 +76,15 @@ device/emulator.
Releasing a New Version
-----------------------

## Release Checklist
Please follow the testing instructions in [the platforms release checklist](https://github.com/bugsnag/platforms-release-checklist/blob/master/README.md), and any additional steps directly below.

### Instructions

If you are a project maintainer, you can build and release a new version of
`bugsnag-android` as follows:

### 1. Ensure you have permission to make a release

This process is a little ridiculous...
## One-time setup

- Create a [Sonatype JIRA](https://issues.sonatype.org) account
- Ask in the [Bugsnag Sonatype JIRA ticket](https://issues.sonatype.org/browse/OSSRH-5533) to become a contributor
- Ask an existing contributor (likely Simon) to confirm in the ticket
- Wait for Sonatype them to confirm the approval


### 2. Prepare for release

- Test unhandled and handled exception reporting via the example application,
ensuring both kinds of reports are sent.
- Update the `CHANGELOG` and `README.md` with any new features

### 3. Release to Maven Central

- Create a file `~/.gradle/gradle.properties` with the following contents:

```ini
Expand All @@ -116,36 +99,47 @@ This process is a little ridiculous...
signing.secretKeyRingFile=/Users/{username}/.gnupg/secring.gpg
```

- Build and upload the new version

- Update the version number, tag a release, and upload an archive by running `make VERSION=[number] release`

- "Promote" the release build on Maven Central

- Go to the [sonatype open source dashboard](https://oss.sonatype.org/index.html#stagingRepositories)
- Click the search box at the top right, and type “com.bugsnag”
- Select the com.bugsnag staging repository
- Click the “close” button in the toolbar, no message
- Click the “refresh” button
- Select the com.bugsnag closed repository
- Click the “release” button in the toolbar

### 4. Upload the .aar file to GitHub

- Create a "release" from your new tag on [GitHub Releases](https://github.com/bugsnag/bugsnag-android/releases)
- Upload the generated `.aar` file from `build/outputs/aar/bugsnag-android-release.aar` on the "edit tag" page for this release tag

### 5. Update documentation

- Update installation instructions in the quickstart
guides on the website with the new version number and any other changes
- Bump the version number in the installation instructions on
docs.bugsnag.com/platforms/android, and add any new content

### 6. Keep dependent libraries in sync

- Make releases to downstream libraries, if appropriate (generally for bug
fixes)

### 7. Update Method Count Badge
- Update the version number specified in the URL for the method count badge in the README.
## Every time

### Pre-release Checklist

- [ ] Does the build pass on the CI server?
- [ ] Are all Docs PRs ready to go?
- [ ] Do the installation instructions work when creating an example app from scratch?
- [ ] Has all new functionality been manually tested on a release build?
- [ ] Ensure the example app sends an unhandled error
- [ ] Ensure the example app sends a handled error
- [ ] If a response is not received from the server, is the report queued for later?
- [ ] If no network connection is available, is the report queued for later?
- [ ] On a throttled network, is the request timeout reasonable, and the main thread not blocked?
- [ ] Are queued reports sent asynchronously?
- [ ] Have the installation instructions been updated on the [dashboard](https://github.com/bugsnag/bugsnag-website/tree/master/app/views/dashboard/projects/install) as well as the [docs site](https://github.com/bugsnag/docs.bugsnag.com)?

### Making the release

- [ ] Update the version number and dex count badge by running `make VERSION=[number] bump`
- [ ] Inspected the updated CHANGELOG, README, and version files to ensure they are correct
- [ ] Release to GitHub, Maven Central, and Bintray by running `make VERSION=[number] release`
- [ ] "Promote" the release build on Maven Central
- Go to the [sonatype open source dashboard](https://oss.sonatype.org/index.html#stagingRepositories)
- Click the search box at the top right, and type “com.bugsnag”
- Select the com.bugsnag staging repository
- Click the “close” button in the toolbar, no message
- Click the “refresh” button
- Select the com.bugsnag closed repository
- Click the “release” button in the toolbar
- [ ] Create a release from your new tag on [GitHub Releases](https://github.com/bugsnag/bugsnag-android/releases)
- Add the contents of the latest changelog entry to the new release
- Upload the generated `.aar` file from `build/outputs/aar/bugsnag-android-release.aar`
- [ ] Open the [Bintray repository](https://bintray.com/bugsnag/maven/bugsnag-android) and publish the new artifacts
- [ ] Merge outstanding docs PRs related to this release


### Post-release Checklist

_(May take some time to propagate to maven central and bintray)_

- [ ] Have all Docs PRs been merged?
- [ ] Can a freshly created example app send an error report from a release build using the released artefact?
- [ ] Do the existing example apps send an error report using the released artifact?
- [ ] Make releases to downstream libraries, if appropriate (generally for bug fixes)
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ endif
@sed -i '' "s/VERSION_NAME=.*/VERSION_NAME=$(VERSION)/" gradle.properties
@sed -i '' "s/NOTIFIER_VERSION = .*;/NOTIFIER_VERSION = \"$(VERSION)\";/"\
sdk/src/main/java/com/bugsnag/android/Notifier.java
@sed -i '' "s/## TBD/## $(VERSION) ($(shell date '+%Y-%m-%d'))/" CHANGELOG.md

badge: build
ifneq ($(shell git diff),)
Expand All @@ -45,14 +46,14 @@ endif


# Makes a release
release: clean bump
release:
ifneq ($(shell git diff origin/master..master),)
@$(error You have unpushed commits on the master branch)
endif
ifeq ($(VERSION),)
@$(error VERSION is not defined. Run with `make VERSION=number release`)
endif
@git add -p README.md gradle.properties sdk/src/main/java/com/bugsnag/android/Notifier.java
@git add -p CHANGELOG.md README.md gradle.properties sdk/src/main/java/com/bugsnag/android/Notifier.java
@git commit -m "Release v$(VERSION)"
@git tag v$(VERSION)
@git push origin master v$(VERSION)
Expand Down

0 comments on commit 7ba6e2b

Please sign in to comment.