param([string]$ProjectDir, [string]$ProjectPath); $MainVers="..\Resources\MainVers.txt" $FileVers="..\Resources\VersNum.txt" $FileManIn="..\Resources\manifest-original.xml" $FileManOut="..\Resources\manifest.xml" $FileCLogIn="..\Resources\ChangeLog-original.html" $FileCLogOut="..\Resources\ChangeLog.html" $MajMin=Get-Content $MainVers #"0.9." $currentDate = get-date -format yyMM; $currentTime = get-date -format ddHH; $find = "(.|\n)*?"; $currRelNum=$MajMin + $currentDate +"." + $currentTime $replace = "" + $MajMin + $currentDate +"." + $currentTime + ""; $csproj = Get-Content $ProjectPath $csprojUpdated = $csproj -replace $find, $replace Set-Content -Path $ProjectPath -Value $csprojUpdated Set-Content -Path $FileVers -Value $currRelNum # replace x manifest $manData = Get-Content $FileManIn $manData = $manData -replace "1.0.0.0", $currRelNum $manData = $manData -replace "{{DIRNAME}}", "WDC" $manData = $manData -replace "{{BRANCHNAME}}", "stable" $manData = $manData -replace "{{PACKNAME}}", "WDC.API" Set-Content -Path $FileManOut -Value $manData # replace x ChangeLog $clogData = Get-Content $FileCLogIn $clogData = $clogData -replace "{{CURRENT-REL}}", $currRelNum Set-Content -Path $FileCLogOut -Value $clogData