16 lines
600 B
PowerShell
16 lines
600 B
PowerShell
param([string]$ProjectDir, [string]$ProjectPath);
|
|
|
|
$MainVers="..\Resources\MainVers.txt"
|
|
$FileVers="..\Resources\VersNum.txt"
|
|
$MajMin=Get-Content $MainVers
|
|
$currentDate = get-date -format yyMM;
|
|
$currentTime = get-date -format ddHH;
|
|
$find = "<Version>(.|\n)*?</Version>";
|
|
$currRelNum=$MajMin + $currentDate +"." + $currentTime
|
|
$replace = "<Version>" + $MajMin + $currentDate +"." + $currentTime + "</Version>";
|
|
$csproj = Get-Content $ProjectPath
|
|
$csprojUpdated = $csproj -replace $find, $replace
|
|
|
|
Set-Content -Path $ProjectPath -Value $csprojUpdated
|
|
Set-Content -Path $FileVers -Value $currRelNum
|