mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-06-28 15:30:17 +08:00
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:
parent
0fcc4e54c8
commit
f2d94413dc
13
tools/set-version.ps1
Normal file
13
tools/set-version.ps1
Normal 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
|
Loading…
Reference in New Issue
Block a user