Skip to content

Commit 3c3b768

Browse files
AllowPrerelease when building Preview build (#1263)
1 parent 765c76c commit 3c3b768

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

PowerShellEditorServices.build.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ param(
2121
$script:IsUnix = $PSVersionTable.PSEdition -and $PSVersionTable.PSEdition -eq "Core" -and !$IsWindows
2222
$script:RequiredSdkVersion = (Get-Content (Join-Path $PSScriptRoot 'global.json') | ConvertFrom-Json).sdk.version
2323
$script:BuildInfoPath = [System.IO.Path]::Combine($PSScriptRoot, "src", "PowerShellEditorServices.Hosting", "BuildInfo.cs")
24+
$script:PsesCommonProps = [xml](Get-Content -Raw "$PSScriptRoot/PowerShellEditorServices.Common.props")
25+
$script:IsPreview = [bool]($script:PsesCommonProps.Project.PropertyGroup.VersionSuffix)
2426

2527
$script:NetRuntime = @{
2628
Core = 'netcoreapp2.1'
@@ -361,7 +363,7 @@ task RestorePsesModules -After Build {
361363
Name = $name
362364
MinimumVersion = $_.Value.MinimumVersion
363365
MaximumVersion = $_.Value.MaximumVersion
364-
AllowPrerelease = $_.Value.AllowPrerelease
366+
AllowPrerelease = $script:IsPreview
365367
Repository = if ($_.Value.Repository) { $_.Value.Repository } else { $DefaultModuleRepository }
366368
Path = $submodulePath
367369
}

modules.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
{
22
"PSScriptAnalyzer":{
33
"MinimumVersion":"1.18.3",
4-
"MaximumVersion":"1.99",
5-
"AllowPrerelease":false
4+
"MaximumVersion":"1.99"
65
},
76
"Plaster":{
87
"MinimumVersion":"1.0",
9-
"MaximumVersion":"1.99",
10-
"AllowPrerelease":false
8+
"MaximumVersion":"1.99"
119
},
1210
"PSReadLine":{
13-
"MinimumVersion":"2.0.0",
14-
"AllowPrerelease":true
11+
"MinimumVersion":"2.0.0"
1512
}
1613
}

0 commit comments

Comments
 (0)