From ecef6fd7b53f5272df234c7dccc012b930efb65e Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Mon, 11 Nov 2024 17:08:33 +0100 Subject: [PATCH] Use PowerShell --- .github/workflows/openmw.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/openmw.yml b/.github/workflows/openmw.yml index b9a88c82a9..cfc1faa438 100644 --- a/.github/workflows/openmw.yml +++ b/.github/workflows/openmw.yml @@ -115,12 +115,19 @@ jobs: - name: Download prebuilt vcpkg packages working-directory: ${{ github.workspace }}/deps run: | - MANIFEST="vcpkg-x64-${{ matrix.image }}-${{ env.VCPKG_DEPS_TAG }}.txt" + $MANIFEST = "vcpkg-x64-${{ matrix.image }}-${{ env.VCPKG_DEPS_TAG }}.txt" curl --fail --retry 3 -L -o "$MANIFEST" "https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/$MANIFEST" - { read -r URL && read -r HASH FILE; } < "$MANIFEST" + $lines = Get-Content "$MANIFEST" + $URL = $lines[0] + $split = -split $lines[1] + $HASH = $split[0] + $FILE = $split[1] curl --fail --retry 3 -L -o "$FILE" "$URL" - echo "$HASH $FILE" | shasum -a 512 --check - echo "archive=$FILE" >> "$GITHUB_ENV" + $filehash = Get-FileHash "$FILE" -Algorithm SHA512 + if ( $filehash.hash -ne "$HASH" ) { + exit 1 + } + echo "archive=$FILE" >> $env:GITHUB_ENV - name: Extract archived prebuilt vcpkg packages working-directory: ${{ github.workspace }}/deps