From 5fe5fcfb54c4ea983512bc18c939ca9e8359c85c Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Tue, 27 Sep 2022 09:02:46 -0400 Subject: [PATCH] Prepare for release 5.4.1 --- .github/workflows/ci-examples.yml | 8 +++++++- .github/workflows/ci-tests.yml | 2 +- ChangeLog.md | 9 +++++++++ ReadMe.md | 4 ++-- examples/DropboxAndroid/app/build.gradle | 2 +- examples/build.gradle | 2 +- .../core/examples/upload_file/Main.java | 20 ++----------------- gradle.properties | 2 +- .../java/com/dropbox/core/DbxSdkVersion.java | 2 +- 9 files changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci-examples.yml b/.github/workflows/ci-examples.yml index 6f7f5abf2..641b23640 100644 --- a/.github/workflows/ci-examples.yml +++ b/.github/workflows/ci-examples.yml @@ -8,7 +8,7 @@ on: push: branches: [ master ] pull_request: - branches: [ master ] + branches: [ 5.3.0 ] jobs: build: @@ -17,27 +17,33 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'zulu' - uses: actions/checkout@v2 + - name: Set up Python uses: actions/setup-python@v3 with: python-version: '3.9.10' - run: python -m pip install ply && pip install six + - name: Grant execute permissions run: chmod +x gradlew && chmod +x update-submodules && chmod +x generate-ci-auth-file && chmod +x scripts/run-examples + - name: Set up submodules run: ./update-submodules + - name: Obtain access token env: APP_KEY: ${{ secrets.APP_KEY }} APP_SECRET: ${{ secrets.APP_SECRET }} REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} run: ./generate-ci-auth-file + - name: Run Examples run: ./scripts/run-examples $(find `pwd` -name auth_output) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 9b11ea27d..86a81fc32 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -8,7 +8,7 @@ on: push: branches: [ master ] pull_request: - branches: [ master ] + branches: [ 5.3.0 ] jobs: build: diff --git a/ChangeLog.md b/ChangeLog.md index 42d118d51..382fe3cb7 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,12 @@ +## 5.4.1 (2022-09-27) +--------------------------------------------- +- Republished `5.3.0` as `5.4.1` due to the premature publishing of `5.4.0`. +- No other changes. + +## 5.4.0 (2022-09-26) +--------------------------------------------- +- ⚠️ Published prematurely. Please stay on `5.3.0` or update to `5.4.1` (which is just a republished version of `5.3.0`) + ## 5.3.0 (2022-07-20) [Milestone](https://github.com/dropbox/dropbox-sdk-java/milestone/1?closed=1) --------------------------------------------- - Update dropbox-api-spec to point to more recent version (July 13, 2022) [#400](https://github.com/dropbox/dropbox-sdk-java/pull/400) diff --git a/ReadMe.md b/ReadMe.md index 3fa251f5f..956051302 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -24,7 +24,7 @@ If you're using Maven, then edit your project's "pom.xml" and add this to the `< com.dropbox.core dropbox-core-sdk - 5.2.0 + 5.4.1 ``` @@ -33,7 +33,7 @@ If you are using Gradle, then edit your project's "build.gradle" and add this to ```groovy dependencies { // ... - implementation 'com.dropbox.core:dropbox-core-sdk:5.2.0' + implementation 'com.dropbox.core:dropbox-core-sdk:5.4.1' } ``` diff --git a/examples/DropboxAndroid/app/build.gradle b/examples/DropboxAndroid/app/build.gradle index eb68be44c..485749b5a 100644 --- a/examples/DropboxAndroid/app/build.gradle +++ b/examples/DropboxAndroid/app/build.gradle @@ -47,7 +47,7 @@ android { } dependencies { - implementation group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '+', changing: true + implementation group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '5.3.0' implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation 'androidx.core:core-ktx:1.7.0' diff --git a/examples/build.gradle b/examples/build.gradle index 7da3fc463..772502e64 100644 --- a/examples/build.gradle +++ b/examples/build.gradle @@ -14,7 +14,7 @@ subprojects { } dependencies { - implementation group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '+', changing: true + implementation group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '5.3.0' } compileJava { diff --git a/examples/upload-file/src/main/java/com/dropbox/core/examples/upload_file/Main.java b/examples/upload-file/src/main/java/com/dropbox/core/examples/upload_file/Main.java index 24a1d25cd..1319c6db8 100644 --- a/examples/upload-file/src/main/java/com/dropbox/core/examples/upload_file/Main.java +++ b/examples/upload-file/src/main/java/com/dropbox/core/examples/upload_file/Main.java @@ -15,7 +15,6 @@ import com.dropbox.core.v2.files.UploadErrorException; import com.dropbox.core.v2.files.UploadSessionCursor; import com.dropbox.core.v2.files.UploadSessionFinishErrorException; -import com.dropbox.core.v2.files.UploadSessionLookupErrorException; import com.dropbox.core.v2.files.WriteMode; import java.io.File; @@ -42,7 +41,7 @@ public class Main { * eliminates unnecessary round-trips to the servers. * * @param dbxClient Dropbox user authenticated client - * @param localFIle local file to upload + * @param localFile local file to upload * @param dropboxPath Where to upload the file to within Dropbox */ private static void uploadFile(DbxClientV2 dbxClient, File localFile, String dropboxPath) { @@ -74,7 +73,7 @@ private static void uploadFile(DbxClientV2 dbxClient, File localFile, String dro * to re-upload all the bytes). * * @param dbxClient Dropbox user authenticated client - * @param localFIle local file to upload + * @param localFile local file to upload * @param dropboxPath Where to upload the file to within Dropbox */ private static void chunkedUploadFile(DbxClientV2 dbxClient, File localFile, String dropboxPath) { @@ -158,21 +157,6 @@ public void onProgress(long l) { thrown = ex; // network issue with Dropbox (maybe a timeout?) try again continue; - } catch (UploadSessionLookupErrorException ex) { - if (ex.errorValue.isIncorrectOffset()) { - thrown = ex; - // server offset into the stream doesn't match our offset (uploaded). Seek to - // the expected offset according to the server and try again. - uploaded = ex.errorValue - .getIncorrectOffsetValue() - .getCorrectOffset(); - continue; - } else { - // Some other error occurred, give up. - System.err.println("Error uploading to Dropbox: " + ex.getMessage()); - System.exit(1); - return; - } } catch (UploadSessionFinishErrorException ex) { if (ex.errorValue.isLookupFailed() && ex.errorValue.getLookupFailedValue().isIncorrectOffset()) { thrown = ex; diff --git a/gradle.properties b/gradle.properties index bf216eea7..fa0959b1c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # POM GROUP = com.dropbox.core -VERSION_NAME=5.3.0 +VERSION_NAME=5.4.1 POM_ARTIFACT_ID = dropbox-core-sdk POM_NAME = Dropbox SDK Java diff --git a/src/main/java/com/dropbox/core/DbxSdkVersion.java b/src/main/java/com/dropbox/core/DbxSdkVersion.java index 334b045b5..e61da4c3b 100644 --- a/src/main/java/com/dropbox/core/DbxSdkVersion.java +++ b/src/main/java/com/dropbox/core/DbxSdkVersion.java @@ -12,6 +12,6 @@ public class DbxSdkVersion // https://github.com/dropbox/dropbox-sdk-java/issues/357 private static String loadVersion() { - return "5.3.0"; + return "5.4.1"; } }