From ae6a15b391be2e3cdbc4c60ee2fe302598852dd5 Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Mon, 10 Oct 2022 14:49:36 +0200 Subject: [PATCH 01/11] Check POM version and linux metainfo.xml file during release steps --- .../workflows/release-check-precondition.yml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/release-check-precondition.yml diff --git a/.github/workflows/release-check-precondition.yml b/.github/workflows/release-check-precondition.yml new file mode 100644 index 000000000..ae598a3f4 --- /dev/null +++ b/.github/workflows/release-check-precondition.yml @@ -0,0 +1,39 @@ +name: Release check precondition + +on: + push: + branches: + - 'hotfix/**' + - 'release/**' + tags: + - '*' + +jobs: + test: + name: Validate pushed commit to release/hotfix or pushed tag + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Validate POM version + run: | + if [[ $GITHUB_REF =~ refs/heads/(hotfix|release)/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then + SEM_VER_STR=${GITHUB_REF##*/} + elif [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then + SEM_VER_STR=${GITHUB_REF##*/} + else + echo "Failed to parse version" + exit 1 + fi + + if ![[ SEM_VER_STR = `mvn help:evaluate -Dexpression=project.version -q -DforceStdout` ]]; then + echo "Version not set in POM" + exit 1 + fi + - name: Validate release in org.cryptomator.Cryptomator.metainfo.xml file + run: | + if ![[ grep "" dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml ]]; then + echo "Release not set in dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml" + exit 1 + fi From 34d6e8c4198ec54522c5c0e9241c104ddb1545c5 Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Mon, 10 Oct 2022 15:28:16 +0200 Subject: [PATCH 02/11] Validate POM version and linux metainfo.xml file during build --- .github/workflows/build.yml | 23 +++++++++++ .../workflows/release-check-precondition.yml | 39 ------------------- 2 files changed, 23 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/release-check-precondition.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5270365b3..83df47560 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,6 +43,29 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Validate POM version + if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/hotfix/') || startsWith(github.ref, 'refs/heads/release/') + run: | + if [[ $GITHUB_REF =~ refs/heads/(hotfix|release)/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then + SEM_VER_STR=${GITHUB_REF##*/} + elif [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then + SEM_VER_STR=${GITHUB_REF##*/} + else + echo "Failed to parse version" + exit 1 + fi + + if ![[ SEM_VER_STR = `mvn help:evaluate -Dexpression=project.version -q -DforceStdout` ]]; then + echo "Version not set in POM" + exit 1 + fi + - name: Validate release in org.cryptomator.Cryptomator.metainfo.xml file + if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/hotfix/') || startsWith(github.ref, 'refs/heads/release/') + run: | + if ![[ grep "" dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml ]]; then + echo "Release not set in dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml" + exit 1 + fi - name: Sign source tarball with key 615D449FE6E6A235 if: startsWith(github.ref, 'refs/tags/') run: | diff --git a/.github/workflows/release-check-precondition.yml b/.github/workflows/release-check-precondition.yml deleted file mode 100644 index ae598a3f4..000000000 --- a/.github/workflows/release-check-precondition.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Release check precondition - -on: - push: - branches: - - 'hotfix/**' - - 'release/**' - tags: - - '*' - -jobs: - test: - name: Validate pushed commit to release/hotfix or pushed tag - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Validate POM version - run: | - if [[ $GITHUB_REF =~ refs/heads/(hotfix|release)/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then - SEM_VER_STR=${GITHUB_REF##*/} - elif [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then - SEM_VER_STR=${GITHUB_REF##*/} - else - echo "Failed to parse version" - exit 1 - fi - - if ![[ SEM_VER_STR = `mvn help:evaluate -Dexpression=project.version -q -DforceStdout` ]]; then - echo "Version not set in POM" - exit 1 - fi - - name: Validate release in org.cryptomator.Cryptomator.metainfo.xml file - run: | - if ![[ grep "" dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml ]]; then - echo "Release not set in dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml" - exit 1 - fi From 45c2dd0358a934b2e14f5539f19dd26b953f92c7 Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Tue, 11 Oct 2022 12:42:59 +0200 Subject: [PATCH 03/11] Validate release check precondition in separate job --- .github/workflows/build.yml | 58 +++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83df47560..c0376341e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,11 +12,42 @@ defaults: run: shell: bash -jobs: +jobs: + release-check-precondition: + name: Validate pushed commit to release/hotfix branch or pushed tag + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/hotfix/') || startsWith(github.ref, 'refs/heads/release/') + steps: + - uses: actions/checkout@v2 + - id: validate-pom-version + name: Validate POM version + run: | + if [[ $GITHUB_REF =~ refs/heads/(hotfix|release)/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then + SEM_VER_STR=${GITHUB_REF##*/} + elif [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then + SEM_VER_STR=${GITHUB_REF##*/} + else + echo "Failed to parse version" + exit 1 + fi + + if [[ ${SEM_VER_STR} == `mvn help:evaluate -Dexpression=project.version -q -DforceStdout` ]]; then + echo "::set-output name=semVerStr::${SEM_VER_STR}" + else + echo "Version not set in POM" + exit 1 + fi + - name: Validate release in org.cryptomator.Cryptomator.metainfo.xml file + run: | + if ! grep -q "" dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml; then + echo "Release not set in dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml" + exit 1 + fi test: name: Compile and Test + needs: release-check-precondition runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" + if: "always() && (needs.release-check-precondition.result=='success' || needs.release-check-precondition.result=='skipped') && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 @@ -43,29 +74,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - name: Validate POM version - if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/hotfix/') || startsWith(github.ref, 'refs/heads/release/') - run: | - if [[ $GITHUB_REF =~ refs/heads/(hotfix|release)/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then - SEM_VER_STR=${GITHUB_REF##*/} - elif [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then - SEM_VER_STR=${GITHUB_REF##*/} - else - echo "Failed to parse version" - exit 1 - fi - - if ![[ SEM_VER_STR = `mvn help:evaluate -Dexpression=project.version -q -DforceStdout` ]]; then - echo "Version not set in POM" - exit 1 - fi - - name: Validate release in org.cryptomator.Cryptomator.metainfo.xml file - if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/hotfix/') || startsWith(github.ref, 'refs/heads/release/') - run: | - if ![[ grep "" dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml ]]; then - echo "Release not set in dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml" - exit 1 - fi - name: Sign source tarball with key 615D449FE6E6A235 if: startsWith(github.ref, 'refs/tags/') run: | From b10d892b12189f3f7533c85dc42186056a188e12 Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Tue, 11 Oct 2022 15:09:19 +0200 Subject: [PATCH 04/11] Skip release tests too when ci-skip provided in commit message --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0376341e..b895f30ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,8 @@ jobs: release-check-precondition: name: Validate pushed commit to release/hotfix branch or pushed tag runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/hotfix/') || startsWith(github.ref, 'refs/heads/release/') + if: "(startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/hotfix/') || startsWith(github.ref, 'refs/heads/release/')) && \ + !(contains(github.event.head_commit.message, '[ci skip]') || contains(github.event.head_commit.message, '[skip ci]'))" steps: - uses: actions/checkout@v2 - id: validate-pom-version @@ -47,7 +48,9 @@ jobs: name: Compile and Test needs: release-check-precondition runs-on: ubuntu-latest - if: "always() && (needs.release-check-precondition.result=='success' || needs.release-check-precondition.result=='skipped') && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" + if: "always() && \ + (needs.release-check-precondition.result=='success' || needs.release-check-precondition.result=='skipped') && \ + !(contains(github.event.head_commit.message, '[ci skip]') || contains(github.event.head_commit.message, '[skip ci]'))" steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 From 26ecd67a791463a7a45491f48ed184af5b7979a5 Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Tue, 11 Oct 2022 15:33:44 +0200 Subject: [PATCH 05/11] Update linux common metainfo.xml file --- dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml b/dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml index 3e74a00a0..453a5f9d0 100644 --- a/dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml +++ b/dist/linux/common/org.cryptomator.Cryptomator.metainfo.xml @@ -66,6 +66,7 @@ + From fd6eb2139da928848e69767263a5ee5ce006b66c Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Tue, 11 Oct 2022 17:45:59 +0200 Subject: [PATCH 06/11] Minor cleanup in build.yml --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b895f30ff..bb663779c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,8 +16,8 @@ jobs: release-check-precondition: name: Validate pushed commit to release/hotfix branch or pushed tag runs-on: ubuntu-latest - if: "(startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/hotfix/') || startsWith(github.ref, 'refs/heads/release/')) && \ - !(contains(github.event.head_commit.message, '[ci skip]') || contains(github.event.head_commit.message, '[skip ci]'))" + if: "(startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/hotfix/') || startsWith(github.ref, 'refs/heads/release/')) + && !(contains(github.event.head_commit.message, '[ci skip]') || contains(github.event.head_commit.message, '[skip ci]'))" steps: - uses: actions/checkout@v2 - id: validate-pom-version @@ -48,9 +48,9 @@ jobs: name: Compile and Test needs: release-check-precondition runs-on: ubuntu-latest - if: "always() && \ - (needs.release-check-precondition.result=='success' || needs.release-check-precondition.result=='skipped') && \ - !(contains(github.event.head_commit.message, '[ci skip]') || contains(github.event.head_commit.message, '[skip ci]'))" + if: "always() + && (needs.release-check-precondition.result=='success' || needs.release-check-precondition.result=='skipped') + && !(contains(github.event.head_commit.message, '[ci skip]') || contains(github.event.head_commit.message, '[skip ci]'))" steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 From 322779ee8876515f83d78598e0191e02f7ed6762 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Tue, 11 Oct 2022 20:16:24 +0200 Subject: [PATCH 07/11] Refactor winget release to own workflow file (#2471) ... and call it on release windows build Co-authored-by: Sebastian Stenzel --- .github/workflows/win-exe.yml | 23 +++++----------- .github/workflows/winget.yml | 49 +++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/winget.yml diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index 91d967bf7..eabf98b86 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -8,11 +8,6 @@ on: version: description: 'Version' required: false - winget-release: - description: 'Release artifacts to winget' - required: true - type: boolean - default: false env: JAVA_VERSION: 17 @@ -194,19 +189,13 @@ jobs: semVerStr: ${{ steps.versions.outputs.semVerStr }} revNum: ${{ steps.versions.outputs.revNum }} - publish-winget: - name: Publish on winget repo - runs-on: windows-latest + call-winget-flow: needs: [build-msi] - if: github.event.action == 'published' || inputs.winget-release - steps: - - name: Submit package to Windows Package Manager Community Repository - run: | - iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe - $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json - $installerUrl = $github.release.assets | Where-Object -Property name -match '^Cryptomator-.*\.msi' | Select -ExpandProperty browser_download_url -First 1 - .\wingetcreate.exe update Cryptomator.Cryptomator -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.CRYPTOBOT_WINGET_TOKEN }} - shell: pwsh + if: github.event.action == 'published' + uses: ./.github/workflows/winget.yml + with: + releaseTag: ${{ github.event.release.tag_name }} + build-exe: name: Build .exe installer diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml new file mode 100644 index 000000000..7115a1785 --- /dev/null +++ b/.github/workflows/winget.yml @@ -0,0 +1,49 @@ +name: Release to Winget + +on: + workflow_call: + inputs: + releaseTag: + required: true + type: string + workflow_dispatch: + inputs: + releaseTag: + description: 'Release tag name' + required: true + type: string + +jobs: + publish-winget: + name: Publish on winget repo + runs-on: windows-latest + steps: + - name: Get download url for msi artifacts + id: get-release-assets + uses: actions/github-script@v6 + with: + script: | + const query =`query($tag:String!) { + repository(owner:"cryptomator", name:"cryptomator"){ + release(tagName: $tag) { + releaseAssets(first:20) { + nodes { + name + downloadUrl + } + } + } + } + }`; + const variables = { + tag: "${{ inputs.releaseTag }}" + } + return await github.graphql(query, variables) + - name: Submit package to Windows Package Manager Community Repository + id: submit-winget + run: | + iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe + $releaseAssets = (ConvertFrom-Json '${{ steps.get-release-assets.outputs.result }}').repository.release.releaseAssets.nodes + $installerUrl = $releaseAssets | Where-Object -Property name -match '^Cryptomator-.*\.msi$' | Select -ExpandProperty downloadUrl -First 1 + .\wingetcreate.exe update Cryptomator.Cryptomator -s -v "${{ inputs.releaseTag }}" -u "$installerUrl" -t ${{ secrets.CRYPTOBOT_WINGET_TOKEN }} + shell: pwsh From 2399e29d75ab152658e5166db5378621400c00d2 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Wed, 12 Oct 2022 13:42:11 +0200 Subject: [PATCH 08/11] update logback --- pom.xml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index bf13f4771..20a4ffab2 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 18.0.2 4.0.0 9.25.4 - 1.4.3 + 1.4.4 2.0.3 0.5.1 1.7.0 @@ -128,14 +128,6 @@ logback-core ${logback.version} - - - jakarta.mail - jakarta.mail-api - 2.1.0 - compile - true - ch.qos.logback logback-classic From bcfda68bef1211f57d85a3321c1521146563ce9d Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Thu, 13 Oct 2022 12:48:48 +0200 Subject: [PATCH 09/11] bump used gh actions --- .github/workflows/appimage.yml | 4 ++-- .github/workflows/build.yml | 6 +++--- .github/workflows/debian.yml | 4 ++-- .github/workflows/mac-dmg.yml | 2 +- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/win-exe.yml | 10 +++++----- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 7027c9ddf..f16bbefde 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -17,11 +17,11 @@ jobs: name: Build AppImage runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Setup Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bb663779c..77a49ad1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,14 +52,14 @@ jobs: && (needs.release-check-precondition.result=='success' || needs.release-check-precondition.result=='skipped') && !(contains(github.event.head_commit.message, '[ci skip]') || contains(github.event.head_commit.message, '[skip ci]'))" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} cache: 'maven' - name: Cache SonarCloud packages - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index 6f43b5155..687dd0834 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -22,7 +22,7 @@ jobs: name: Build Debian Package runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Install build tools @@ -30,7 +30,7 @@ jobs: sudo apt-get update sudo apt-get install debhelper devscripts dput - name: Setup Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} diff --git a/.github/workflows/mac-dmg.yml b/.github/workflows/mac-dmg.yml index 832213e25..c617b1adb 100644 --- a/.github/workflows/mac-dmg.yml +++ b/.github/workflows/mac-dmg.yml @@ -29,7 +29,7 @@ jobs: output-suffix: arm64 xcode-path: '/Applications/Xcode_13.2.1.app' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Setup Java diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 79a0d5a21..383fe9df7 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -16,8 +16,8 @@ jobs: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index eabf98b86..2e35b3902 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -21,11 +21,11 @@ jobs: name: Build .msi Installer runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Setup Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} @@ -202,15 +202,15 @@ jobs: runs-on: windows-latest needs: [build-msi] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Download .msi - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: msi path: dist/win/bundle/resources - name: Strip version info from msi file name run: mv dist/win/bundle/resources/Cryptomator*.msi dist/win/bundle/resources/Cryptomator.msi - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} From 01a6475d5ff94b35362c12fa464db6726196e830 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 17 Oct 2022 17:13:12 +0200 Subject: [PATCH 10/11] replace deprecated method call --- .../cryptomator/ui/keyloading/hub/HubKeyLoadingModule.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/keyloading/hub/HubKeyLoadingModule.java b/src/main/java/org/cryptomator/ui/keyloading/hub/HubKeyLoadingModule.java index 6e28b8796..a23a5f1b3 100644 --- a/src/main/java/org/cryptomator/ui/keyloading/hub/HubKeyLoadingModule.java +++ b/src/main/java/org/cryptomator/ui/keyloading/hub/HubKeyLoadingModule.java @@ -56,8 +56,10 @@ public abstract class HubKeyLoadingModule { @Named("deviceId") static String provideDeviceId(DeviceKey deviceKey) { var publicKey = Objects.requireNonNull(deviceKey.get()).getPublic().getEncoded(); - var hashedKey = MessageDigestSupplier.SHA256.get().digest(publicKey); - return BaseEncoding.base16().encode(hashedKey); + try (var instance = MessageDigestSupplier.SHA256.instance()) { + var hashedKey = instance.get().digest(publicKey); + return BaseEncoding.base16().encode(hashedKey); + } } @Provides From d619a0cbf4103d6ea89a0d84bdce889442ab9aab Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Wed, 26 Oct 2022 11:40:09 +0200 Subject: [PATCH 11/11] bump jwt version --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 20a4ffab2..0eb618328 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 2.1.0-rc1 - 2.4.4 + 2.4.5 1.1.0 1.1.2 1.1.2 @@ -44,7 +44,7 @@ 31.1-jre 2.9.1 18.0.2 - 4.0.0 + 4.2.1 9.25.4 1.4.4 2.0.3