Permalink
Browse files

update the sharedassembly.vb file with the updated version as well

  • Loading branch information...
1 parent 2823597 commit 2e25b9016b3359bb1b7478c5e099bc5bc8f02657 @ferventcoder committed Dec 20, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 build.ps1
View
@@ -18,6 +18,21 @@ foreach ($line in $sharedAssemblyContents) {
}
$sharedAssemblyReplace | Out-File $sharedAssembly -encoding UTF8 -force
+$sharedAssembly = Join-Path $localDir 'SharedAssembly.vb'
+Write-Host "Updating version in `'$sharedAssembly`'"
+$sharedAssemblyContents = Get-Content $sharedAssembly
+$sharedAssemblyReplace = @()
+foreach ($line in $sharedAssemblyContents) {
+ $assemblyVersionPattern = 'AssemblyVersion\(\"\d+\.\d+\.\d+\.\d+\"\)';
+ $assemblyVersionReplace = "AssemblyVersion(`"$version`")"
+ $line = [regex]::replace($line, $assemblyVersionPattern, "$assemblyVersionReplace")
+ $assemblyFileVersionPattern = 'AssemblyFileVersion\(\"\d+\.\d+\.\d+\.\d+\"\)';
+ $assemblyFileVersionReplace = "AssemblyFileVersion(`"$version`")"
+ $line = [regex]::replace($line, $assemblyFileVersionPattern, "$assemblyFileVersionReplace")
+ $sharedAssemblyReplace += [Array]$line
+}
+$sharedAssemblyReplace | Out-File $sharedAssembly -encoding UTF8 -force
+
Write-Host "Updating version in nuspecs"
dir -r -include *.nuspec -exclude **\.git\** | %{
[xml]$nuspec = Get-Content $_.FullName

0 comments on commit 2e25b90

Please sign in to comment.