From f7ddb6e714c4449bb4f4385b620a4428527be8ec Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 18 Jul 2022 13:11:12 +0200 Subject: [PATCH] Update and deduplicate winfsp download link Fixes #2117 --- .github/workflows/win-exe.yml | 7 ++++--- dist/win/build.ps1 | 2 +- dist/win/bundle/resources/winfsp-download.url | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 dist/win/bundle/resources/winfsp-download.url diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index 23d970d14..dbded6439 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -16,7 +16,6 @@ on: env: JAVA_VERSION: 17 - WINFSP_MSI: https://github.com/winfsp/winfsp/releases/download/v1.10/winfsp-1.10.22006.msi defaults: run: @@ -238,8 +237,10 @@ jobs: "-Dlicense.licenseMergesUrl=file:///${{ github.workspace }}/license/merges" shell: pwsh - name: Download WinFsp - run: - curl --output dist/win/bundle/resources/winfsp.msi -L ${{ env.WINFSP_MSI }} + run: | + $winfspUrl= (Select-String -Path ".\dist\win\bundle\resources\winfsp-download.url" -Pattern 'https:.*').Matches.Value + curl --output dist/win/bundle/resources/winfsp.msi -L $winfspUrl + shell: pwsh - name: Compile to wixObj file run: > "${WIX}/bin/candle.exe" dist/win/bundle/bundleWithWinfsp.wxs diff --git a/dist/win/build.ps1 b/dist/win/build.ps1 index 766743bd3..5f08e7ac2 100644 --- a/dist/win/build.ps1 +++ b/dist/win/build.ps1 @@ -140,7 +140,7 @@ $Env:JP_WIXWIZARD_RESOURCES = "$buildDir\resources" # download Winfsp [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $ProgressPreference = 'SilentlyContinue' # disables Invoke-WebRequest's progress bar, which slows down downloads to a few bytes/s -$winfspMsiUrl = "https://github.com/winfsp/winfsp/releases/download/v1.10/winfsp-1.10.22006.msi" +$winfspMsiUrl= (Select-String -Path ".\bundle\resources\winfsp-download.url" -Pattern 'https:.*').Matches.Value Write-Output "Downloading ${winfspMsiUrl}..." Invoke-WebRequest $winfspMsiUrl -OutFile ".\bundle\resources\winfsp.msi" # redirects are followed by default diff --git a/dist/win/bundle/resources/winfsp-download.url b/dist/win/bundle/resources/winfsp-download.url new file mode 100644 index 000000000..35472c1ba --- /dev/null +++ b/dist/win/bundle/resources/winfsp-download.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://github.com/winfsp/winfsp/releases/download/v1.11/winfsp-1.11.22176.msi \ No newline at end of file