Skip to content

Commit

Permalink
Fix Install WDK (NuGet) script's condition in accordance to the power…
Browse files Browse the repository at this point in the history
…shell shell
  • Loading branch information
svasista-ms committed Oct 16, 2024
1 parent 37b4bd6 commit f4087df
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 26 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,13 @@ jobs:
- name: Install ${{ matrix.wdk }} (NuGet)
if: startsWith(matrix.wdk, '10.0.')
run: |
wdk="${{ matrix.wdk }}"
if [[ "$wdk" =~ ^10\.0\.[0-9]{5}\.[0-9]{1,4}$ ]]; then
$wdk = '${{ matrix.wdk }}'
if ($wdk -match '^10\.0\.\d{5}\.\d{1,4}$') {
./.github/scripts/nuget-install-wdk.ps1 -wdkVersion $wdk
else
echo "WDK version $wdk does not match the required format 10.0.{5 digit number}.{1 to 4 digit number}"
} else {
Write-Host "WDK version $wdk does not match the required format 10.0.{5 digit number}.{1 to 4 digit number}"
exit 1
fi
shell: bash
}
- name: Install Rust Toolchain (${{ matrix.rust_toolchain }})
uses: dtolnay/rust-toolchain@master
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ jobs:
- name: Install ${{ matrix.wdk }} (NuGet)
if: startsWith(matrix.wdk, '10.0.')
run: |
wdk="${{ matrix.wdk }}"
if [[ "$wdk" =~ ^10\.0\.[0-9]{5}\.[0-9]{1,4}$ ]]; then
$wdk = '${{ matrix.wdk }}'
if ($wdk -match '^10\.0\.\d{5}\.\d{1,4}$') {
./.github/scripts/nuget-install-wdk.ps1 -wdkVersion $wdk
else
echo "WDK version $wdk does not match the required format 10.0.{5 digit number}.{1 to 4 digit number}"
} else {
Write-Host "WDK version $wdk does not match the required format 10.0.{5 digit number}.{1 to 4 digit number}"
exit 1
fi
}
- name: Install Rust Toolchain (${{ matrix.rust_toolchain }})
uses: dtolnay/rust-toolchain@master
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ jobs:
- name: Install ${{ matrix.wdk }} (NuGet)
if: startsWith(matrix.wdk, '10.0.')
run: |
wdk="${{ matrix.wdk }}"
if [[ "$wdk" =~ ^10\.0\.[0-9]{5}\.[0-9]{1,4}$ ]]; then
$wdk = '${{ matrix.wdk }}'
if ($wdk -match '^10\.0\.\d{5}\.\d{1,4}$') {
./.github/scripts/nuget-install-wdk.ps1 -wdkVersion $wdk
else
echo "WDK version $wdk does not match the required format 10.0.{5 digit number}.{1 to 4 digit number}"
} else {
Write-Host "WDK version $wdk does not match the required format 10.0.{5 digit number}.{1 to 4 digit number}"
exit 1
fi
}
- name: Install Rust Toolchain (${{ matrix.rust_toolchain }})
uses: dtolnay/rust-toolchain@master
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/local-development-makefile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ jobs:
- name: Install ${{ matrix.wdk }} (NuGet)
if: startsWith(matrix.wdk, '10.0.')
run: |
wdk="${{ matrix.wdk }}"
if [[ "$wdk" =~ ^10\.0\.[0-9]{5}\.[0-9]{1,4}$ ]]; then
$wdk = '${{ matrix.wdk }}'
if ($wdk -match '^10\.0\.\d{5}\.\d{1,4}$') {
./.github/scripts/nuget-install-wdk.ps1 -wdkVersion $wdk
else
echo "WDK version $wdk does not match the required format 10.0.{5 digit number}.{1 to 4 digit number}"
} else {
Write-Host "WDK version $wdk does not match the required format 10.0.{5 digit number}.{1 to 4 digit number}"
exit 1
fi
}
- name: Install Nightly Rust Toolchain (${{ matrix.target_triple }})
uses: dtolnay/rust-toolchain@nightly
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ jobs:
- name: Install ${{ matrix.wdk }} (NuGet)
if: startsWith(matrix.wdk, '10.0.')
run: |
wdk="${{ matrix.wdk }}"
if [[ "$wdk" =~ ^10\.0\.[0-9]{5}\.[0-9]{1,4}$ ]]; then
$wdk = '${{ matrix.wdk }}'
if ($wdk -match '^10\.0\.\d{5}\.\d{1,4}$') {
./.github/scripts/nuget-install-wdk.ps1 -wdkVersion $wdk
else
echo "WDK version $wdk does not match the required format 10.0.{5 digit number}.{1 to 4 digit number}"
} else {
Write-Host "WDK version $wdk does not match the required format 10.0.{5 digit number}.{1 to 4 digit number}"
exit 1
fi
}
- name: Install Rust Toolchain (${{ matrix.rust_toolchain }})
uses: dtolnay/rust-toolchain@master
Expand Down

0 comments on commit f4087df

Please sign in to comment.