Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "--STEP Updating assembly info"
- function Update-SourceVersion
- {
- Param ([string]$Revision)
- foreach ($o in $input)
- {
- Write-Host "Updating $o"
- $TmpFile = $TmpFile + ".tmp"
- get-content $o.FullName |
- %{$_ -replace '(AssemblyVersion|AssemblyFileVersionAttribute|AssemblyFileVersion)\("([0-9]+\.[0-9]+\.[0-9]+)(\.[\*0-9]+)?"\)', ( '$1("$2.' + $Revision + '")' ) } > $TmpFile
- Move-Item $TmpFile $o.FullName -force
- }
- }
- function Update-AllAssemblyInfoFiles ( $ProjectFolder, $version )
- {
- Write-Host "Updating assembly info in:`n`t$ProjectFolder"
- # the pipe ? is "pipe - foreach "...
- Get-ChildItem $ProjectFolder -recurse -Include "AssemblyInfo.vb", "AssemblyInfo.cs" | Update-SourceVersion $version
- }
- Update-AllAssemblyInfoFiles "$ENV:WORKSPACE\tmp" $ENV:SVN_REVISION
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement