15 lines
476 B
PowerShell
15 lines
476 B
PowerShell
param([string]$ProjectDir, [string]$ProjectPath);
|
|
|
|
|
|
$MajMin="2.8."
|
|
$currentDate = (Get-Date).Month;
|
|
$currentTime = (Get-Date).ToString("dHH");
|
|
$find = "<Version>(.|\n)*?</Version>";
|
|
$currRelNum=$MajMin + $currentDate + "." + $currentTime
|
|
$replace = "<Version>" + $currRelNum + "</Version>";
|
|
$csproj = Get-Content $ProjectPath
|
|
$csprojUpdated = $csproj -replace $find, $replace
|
|
|
|
Write-Output "Update csproj | $currRelNum"
|
|
|
|
Set-Content -Path $ProjectPath -Value $csprojUpdated |