From e0fa8cd08be8aaa720814a51d4a538fc7f822c64 Mon Sep 17 00:00:00 2001 From: Quintin Willison Date: Thu, 17 Sep 2020 08:53:41 +0100 Subject: [PATCH 1/2] Bump version number (patch). --- README.md | 20 +++++++++---------- common.gradle | 2 +- .../test/realtime/RealtimeHttpHeaderTest.java | 2 +- .../io/ably/lib/test/rest/HttpHeaderTest.java | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a97e32df3..a2ca5a898 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,13 @@ Reference the library by including a compile dependency reference in your gradle For [Java](https://bintray.com/ably-io/ably/ably-java/_latestVersion): ``` -compile 'io.ably:ably-java:1.2.1' +compile 'io.ably:ably-java:1.2.2' ``` For [Android](https://bintray.com/ably-io/ably/ably-android/_latestVersion): ``` -compile 'io.ably:ably-android:1.2.1' +compile 'io.ably:ably-android:1.2.2' ``` The library is hosted on the [Jcenter repository](https://bintray.com/ably-io/ably), so you need to ensure that the repo is referenced also; IDEs will typically include this by default: @@ -586,15 +586,15 @@ Configuration of Run/Debug configurations for running the unit tests on Android This library uses [semantic versioning](http://semver.org/). For each release, the following needs to be done: -1. Create a branch for the release, named like `release/1.2.1` +1. Create a branch for the release, named like `release/1.2.2` 2. Replace all references of the current version number with the new version number (check this file [README.md](./README.md) and [common.gradle](./common.gradle)) and commit the changes 3. Run [`github_changelog_generator`](https://github.com/skywinder/Github-Changelog-Generator) to update the [CHANGELOG](./CHANGELOG.md): - * This might work: `github_changelog_generator -u ably -p ably-java --header-label="# Changelog" --release-branch=release/1.2.1 --future-release=v1.2.1` - * But your mileage may vary as it can error. Perhaps more reliable is something like: `github_changelog_generator -u ably -p ably-java --since-tag v1.2.0 --output delta.md` and then manually merge the delta contents in to the main change log + * This might work: `github_changelog_generator -u ably -p ably-java --header-label="# Changelog" --release-branch=release/1.2.2 --future-release=v1.2.2` + * But your mileage may vary as it can error. Perhaps more reliable is something like: `github_changelog_generator -u ably -p ably-java --since-tag v1.2.1 --output delta.md` and then manually merge the delta contents in to the main change log 4. Commit [CHANGELOG](./CHANGELOG.md) 5. Make a PR against `main` 6. Once the PR is approved, merge it into `main` -7. Add a tag and push to origin - e.g.: `git tag v1.2.1 && git push origin v1.2.1` +7. Add a tag and push to origin - e.g.: `git tag v1.2.2 && git push origin v1.2.2` 8. Create the release on Github including populating the release notes (needed so JFrog can pull them in) 9. Assemble and Upload ([see below](#publishing-to-jcenter-and-maven-central) for details) - but the overall order to follow is: 1. Upload to Bintray and use the pushed tag, which will pull in the associated release notes @@ -622,10 +622,10 @@ We publish to: The `java` release process goes as follows: -* Go to the home page for the package; eg https://bintray.com/ably-io/ably/ably-java. Select Add a version, enter the new version such as "1.2.1" in name and save +* Go to the home page for the package; eg https://bintray.com/ably-io/ably/ably-java. Select Add a version, enter the new version such as "1.2.2" in name and save * Run `./gradlew java:assembleRelease` locally to generate the files -* Open local relative folder in Finder, such as `./java/build/release/1.2.1/io/ably/ably-java/1.2.1` -* Go to the new version in JFrog Bintray; eg https://bintray.com/ably-io/ably/ably-java/1.2.1, then click on the link to upload via the UI in the "Upload files" section +* Open local relative folder in Finder, such as `./java/build/release/1.2.2/io/ably/ably-java/1.2.2` +* Go to the new version in JFrog Bintray; eg https://bintray.com/ably-io/ably/ably-java/1.2.2, then click on the link to upload via the UI in the "Upload files" section * Drag in the files from Finder, just the `.jar` files and the `.pom` file. JFrog will fill in the "Target Path" box after you drop the files in. Click the "Upload" button. * You will see a notice something like "4 unpublished files in your version. Will be deleted in 6 days and 22 hours. Publish all or Delete all unpublished files.", make sure you click "Publish all". Wait a few minutes and check that what's uploaded looks like what was uploaded for previous releases. The `maven-metadata` files are created by JFrog. * Update the README text in Bintray (version number needs incrementing). @@ -633,7 +633,7 @@ The `java` release process goes as follows: Similarly for the `android` release at https://bintray.com/ably-io/ably/ably-android: * Run `./gradlew android:assembleRelease` locally to generate the files, and drag in the files in -`./android/build/release/1.2.1/io/ably/ably-android/1.2.1`. +`./android/build/release/1.2.2/io/ably/ably-android/1.2.2`. * In this case upload the `.jar` files, the `.pom` file and the `.aar` file. #### Releasing to Maven Central (Sonatype Nexus) diff --git a/common.gradle b/common.gradle index 1dd23d12c..a944bbeb4 100644 --- a/common.gradle +++ b/common.gradle @@ -4,7 +4,7 @@ repositories { } group = 'io.ably' -version = '1.2.1' +version = '1.2.2' description = """Ably java client library""" tasks.withType(Javadoc) { diff --git a/lib/src/test/java/io/ably/lib/test/realtime/RealtimeHttpHeaderTest.java b/lib/src/test/java/io/ably/lib/test/realtime/RealtimeHttpHeaderTest.java index 22685a406..a4dd8ee57 100644 --- a/lib/src/test/java/io/ably/lib/test/realtime/RealtimeHttpHeaderTest.java +++ b/lib/src/test/java/io/ably/lib/test/realtime/RealtimeHttpHeaderTest.java @@ -91,7 +91,7 @@ public void realtime_websocket_param_test() { * Defaults.ABLY_LIB_PARAM, as ultimately the request param has been derived from those values. */ assertEquals("Verify correct lib version", requestParameters.get("lib"), - Collections.singletonList("java-1.2.1")); + Collections.singletonList("java-1.2.2")); /* Spec RTN2a */ assertEquals("Verify correct format", requestParameters.get("format"), diff --git a/lib/src/test/java/io/ably/lib/test/rest/HttpHeaderTest.java b/lib/src/test/java/io/ably/lib/test/rest/HttpHeaderTest.java index 47a98360e..9056fea36 100644 --- a/lib/src/test/java/io/ably/lib/test/rest/HttpHeaderTest.java +++ b/lib/src/test/java/io/ably/lib/test/rest/HttpHeaderTest.java @@ -84,7 +84,7 @@ public void header_lib_channel_publish() { */ Assert.assertNotNull("Expected headers", headers); Assert.assertEquals(headers.get("x-ably-version"), "1.2"); - Assert.assertEquals(headers.get("x-ably-lib"), "java-1.2.1"); + Assert.assertEquals(headers.get("x-ably-lib"), "java-1.2.2"); } catch (AblyException e) { e.printStackTrace(); Assert.fail("header_lib_channel_publish: Unexpected exception"); From 644300b71c2d1334d2b7057567c07d5626c9f42a Mon Sep 17 00:00:00 2001 From: Quintin Willison Date: Thu, 17 Sep 2020 09:21:17 +0100 Subject: [PATCH 2/2] Update change log. --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 084b85b81..9a8cffc9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Change Log +## [v1.2.2](https://github.com/ably/ably-java/tree/v1.2.2) (2020-09-17) + +[Full Changelog](https://github.com/ably/ably-java/compare/v1.2.1...v1.2.2) + +**Fixed bugs:** + +- Restoral of ActivationStateMachine events fails because not all event types have a no-argument constructor [\#598](https://github.com/ably/ably-java/issues/598) fixed by: + - Discard persisted events with non-nullary constructors [\#599](https://github.com/ably/ably-java/pull/599) ([tcard](https://github.com/tcard)) +- Fatal Exception on API level below 19 [\#596](https://github.com/ably/ably-java/issues/596) fixed by: + - Replace use of StandardCharsets [\#601](https://github.com/ably/ably-java/pull/601) ([QuintinWillison](https://github.com/QuintinWillison)) + +**Other merged pull requests:** + +- Rename master to main [\#592](https://github.com/ably/ably-java/pull/592) ([QuintinWillison](https://github.com/QuintinWillison)) +- Bump protocol version to 1.2 [\#591](https://github.com/ably/ably-java/pull/591) ([QuintinWillison](https://github.com/QuintinWillison)) + ## [v1.2.1](https://github.com/ably/ably-java/tree/v1.2.1) (2020-06-15) [Full Changelog](https://github.com/ably/ably-java/compare/v1.2.0...v1.2.1)