@@ -38,17 +38,17 @@ Task Build -depends Restore-Packages {
3838 exec { . $MSBuild $SolutionFile / t:Build / v:normal / p:Configuration= $Configuration - Net45 }
3939}
4040
41- Task Package - depends Update-AssemblyInfoFiles , Build {
41+ Task Package - depends Build {
4242 exec { . $NuGet pack " $SolutionRoot \Titanium.Web.Proxy\Titanium.Web.Proxy.nuspec" - Properties Configuration= $Configuration - OutputDirectory " $SolutionRoot " - Version " $Version " }
4343}
4444
45- Task Clean {
45+ Task Clean - depends Install-BuildTools {
4646 Remove-Item - Path " $SolutionRoot \packages\*" - Exclude repositories.config - Recurse - Force
4747 Get-ChildItem .\ - include bin, obj - Recurse | foreach ($_ ) { Remove-Item $_.fullname - Force - Recurse }
4848 exec { . $MSBuild $SolutionFile / t:Clean / v:quiet }
4949}
5050
51- Task Restore-Packages - depends Install-BuildTools {
51+ Task Restore-Packages {
5252 exec { . $NuGet restore $SolutionFile }
5353}
5454
@@ -60,25 +60,3 @@ Task Install-MSBuild {
6060}
6161
6262Task Install-BuildTools - depends Install-MSBuild
63-
64- # Borrowed from Luis Rocha's Blog (http://www.luisrocha.net/2009/11/setting-assembly-version-with-windows.html)
65- Task Update-AssemblyInfoFiles {
66- $assemblyVersionPattern = ' AssemblyVersion\("[0-9]+(\.([0-9]+|\*)){1,3}"\)'
67- $fileVersionPattern = ' AssemblyFileVersion\("[0-9]+(\.([0-9]+|\*)){1,3}"\)'
68- $fileCommitPattern = ' AssemblyInformationalVersion\("(.*?)"\)'
69-
70- $assemblyVersion = ' AssemblyVersion("' + $Version + ' ")' ;
71- $fileVersion = ' AssemblyFileVersion("' + $Version + ' ")' ;
72- $commitVersion = ' AssemblyInformationalVersion("' + $InformationalVersion + ' ")' ;
73-
74- Get-ChildItem - path $SolutionRoot - r - filter AssemblyInfo.cs | ForEach-Object {
75- $filename = $_.Directory.ToString () + ' \' + $_.Name
76- $filename + ' -> ' + $Version
77-
78- (Get-Content $filename ) | ForEach-Object {
79- % {$_ -replace $assemblyVersionPattern , $assemblyVersion } |
80- % {$_ -replace $fileVersionPattern , $fileVersion } |
81- % {$_ -replace $fileCommitPattern , $commitVersion }
82- } | Set-Content $filename
83- }
84- }
0 commit comments