PdfPig/tools/set-version.ps1
Eliot Jones 25b6f1d46d change set version script to use correct path
rather than directory relative to the working directory use the path relative to the tools folder.
2020-02-27 13:29:15 +00:00

15 lines
423 B
PowerShell

param (
[Parameter(Position=0,mandatory=$true)]
[string]$version
)
$root = (Split-Path -parent $PSCommandPath)
$projs = Get-ChildItem "$root/../src" -Recurse | Where-Object { $_.extension -eq ".csproj" -and $_.name.IndexOf("Tests") -lt 0 }
$projs | ForEach-Object {
$xml = New-Object XML
$xml.Load($_.FullName)
$xml.Project.PropertyGroup[0].Version = $version
$xml.Save($_.FullName)
}
Write-Host $projs.Length