@@ -38,17 +38,17 @@ Task Build -depends Restore-Packages {
38
38
exec { . $MSBuild $SolutionFile / t:Build / v:normal / p:Configuration= $Configuration - Net45 }
39
39
}
40
40
41
- Task Package - depends Update-AssemblyInfoFiles , Build {
41
+ Task Package - depends Build {
42
42
exec { . $NuGet pack " $SolutionRoot \Titanium.Web.Proxy\Titanium.Web.Proxy.nuspec" - Properties Configuration= $Configuration - OutputDirectory " $SolutionRoot " - Version " $Version " }
43
43
}
44
44
45
- Task Clean {
45
+ Task Clean - depends Install-BuildTools {
46
46
Remove-Item - Path " $SolutionRoot \packages\*" - Exclude repositories.config - Recurse - Force
47
47
Get-ChildItem .\ - include bin, obj - Recurse | foreach ($_ ) { Remove-Item $_.fullname - Force - Recurse }
48
48
exec { . $MSBuild $SolutionFile / t:Clean / v:quiet }
49
49
}
50
50
51
- Task Restore-Packages - depends Install-BuildTools {
51
+ Task Restore-Packages {
52
52
exec { . $NuGet restore $SolutionFile }
53
53
}
54
54
@@ -60,25 +60,3 @@ Task Install-MSBuild {
60
60
}
61
61
62
62
Task 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