create script to increment project versions

each time we want to up the version number of the nuget package it involves opening every csproj and manually updating the version. this script updates the version for all projects, except the test project, in the 'src' folder.
This commit is contained in:
Eliot Jones 2020-02-27 13:24:26 +00:00
parent 0fcc4e54c8
commit f2d94413dc

13
tools/set-version.ps1 Normal file
View File

@ -0,0 +1,13 @@
param (
[Parameter(Position=0,mandatory=$true)]
[string]$version
)
$projs = Get-ChildItem "../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