-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPublish-WebKitDev.ps1
29 lines (22 loc) · 1007 Bytes
/
Publish-WebKitDev.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
param(
[string]$nugetApiKey
)
$ErrorActionPreference = 'Stop';
if (-not ($nugetApiKey)) {
$nugetApiKey = $Env:NUGET_API_KEY;
if (-not ($nugetApiKey)) {
Write-Error 'API key is not specified on command line or in Env:NUGET_API_KEY';
}
}
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted;
# Need to install the modules otherwise the tests will fail
if (-not (Get-Module -Name '7Zip4Powershell')) {
Write-Information -MessageData 'Installing 7Zip4Powershell dependency' -InformationAction Continue;
Install-Module -Name '7Zip4Powershell' -RequiredVersion 1.13.0 -Force;
}
if (-not (Get-Module -Name 'VSSetup')) {
Write-Information -MessageData 'Installing VSSetup dependency' -InformationAction Continue;
Install-Module -Name 'VSSetup' -RequiredVersion 2.2.16 -Force;
}
Write-Information -MessageData 'Publishing WebKitDev package' -InformationAction Continue;
Publish-Module -Path (Join-Path $PSScriptRoot WebKitDev) -NuGetApiKey $nugetApiKey -Force;