Skip to content

Commit 12e82ba

Browse files
committed
Add parameter to bypass Windows 10 SDK installation in host setup script
1 parent 320d84c commit 12e82ba

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

bin/prepare_windows_host_for_app_distribution.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@
88
# - Install the Windows 10 SDK if it detected a `.windows-10-sdk-version` file(2)
99
#
1010
# (1) The certificate it installs is stored in our AWS SecretsManager storage (`windows-code-signing-certificate` secret ID)
11-
# (2) You can skip the Win10 install even if `.windows-10-sdk-version` file is present by using the `SKIP_WINDOWS_10_SDK_INSTALL=1` env var before calling this script
11+
# (2) You can skip the Windows 10 SDK installation regardless of whether `.windows-10-sdk-version` is present by calling the script with `-SkipWindows10SDKInstallation`.
1212
#
1313
# Note: In addition to calling this script, and depending on your client app, you might want to also install `npm` and the `Node.js` packages used by your client app on the agent too. For that part, you should use the `automattic/nvm` Buildkite plugin on the pipeline step's `plugins:` attribute.
1414
#
1515

16+
param (
17+
[switch]$SkipWindows10SDKInstallation = $false
18+
)
19+
1620
# Stop script execution when a non-terminating error occurs
1721
$ErrorActionPreference = "Stop"
1822

@@ -104,6 +108,11 @@ Write-Host "--- :windows: Checking whether to install Windows 10 SDK..."
104108
#
105109
# See https://github.com/hermit99/electron-windows-store/tree/v2.1.2?tab=readme-ov-file#usage
106110

111+
if ($SkipWindows10SDKInstallation) {
112+
Write-Host "Run with SkipWindows10SDKInstallation = true. Skipping Windows 10 SDK installation check."
113+
exit 0
114+
}
115+
107116
$windowsSDKVersionFile = ".windows-10-sdk-version"
108117
if (Test-Path $windowsSDKVersionFile) {
109118
Write-Host "Found $windowsSDKVersionFile file, installing Windows 10 SDK..."

0 commit comments

Comments
 (0)