1515
1616 Assumes the umbrella checkout layout: a directory containing both this repo
1717 and a .localfeed/ sibling. The umbrella directory name doesn't matter.
18-
19- . PARAMETER NoPack
20- Bump the counter and write version.local.props, but skip the actual
21- dotnet pack invocations. Useful when you just want consumers to point at a
22- specific dev version without packing producers.
2318#>
2419[CmdletBinding ()]
25- param (
26- [switch ]$NoPack
27- )
20+ param ()
2821
2922$ErrorActionPreference = ' Stop'
3023$repoRoot = Resolve-Path (Join-Path $PSScriptRoot ' ..' )
@@ -43,11 +36,14 @@ $versionPropsPath = Join-Path $repoRoot 'version.props'
4336$baseVersion = $versionProps.Project.PropertyGroup.RezoomSqlVersion.Trim ()
4437
4538# Find the highest existing dev counter for this base version in the feed.
39+ # Use the .NET API directly: Get-ChildItem -Filter has been observed to
40+ # return nothing in some restricted PowerShell hosts.
4641$pattern = " Rezoom.SQL.Provider.$baseVersion -dev.*.nupkg"
47- $existing = Get-ChildItem $feed - Filter $pattern - ErrorAction SilentlyContinue
42+ $existing = [ System.IO.Directory ]::GetFiles( $feed , $pattern )
4843$highest = 0
4944foreach ($f in $existing ) {
50- if ($f.BaseName -match " \.dev\.(\d+)$" ) {
45+ $name = [System.IO.Path ]::GetFileNameWithoutExtension($f )
46+ if ($name -match " -dev\.(\d+)$" ) {
5147 $n = [int ]$Matches [1 ]
5248 if ($n -gt $highest ) { $highest = $n }
5349 }
@@ -71,11 +67,6 @@ Set-Content -Path $localPropsPath -Value $localPropsBody -NoNewline -Encoding ut
7167
7268Write-Host " Set version to $fullVersion in version.local.props" - ForegroundColor Cyan
7369
74- if ($NoPack ) {
75- Write-Host " -NoPack specified; skipping dotnet pack." - ForegroundColor Yellow
76- return
77- }
78-
7970# Clear any stale entries in the global packages cache for this version.
8071$pkgs = @ (
8172 ' rezoom.sql.mapping' , ' rezoom.sql.compiler' , ' rezoom.sql.provider' ,
0 commit comments