File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,14 +78,6 @@ function Get-BuildTaskParams($project) {
7878 $taskParams
7979}
8080
81- function Get-RestoreTaskParams ($project ) {
82- @ {
83- Inputs = " $BuildRoot /$project /$project .csproj"
84- Outputs = " $BuildRoot /$project /$project .csproj"
85- Jobs = {dotnet restore}
86- }
87- }
88-
8981function Get-CleanTaskParams ($project ) {
9082 @ {
9183 Jobs = {
@@ -122,13 +114,11 @@ popd
122114$projects = @ (" engine" , " rules" )
123115$projects | ForEach-Object {
124116 Add-ProjectTask $_ build (Get-BuildTaskParams $_ )
125- Add-ProjectTask $_ restore (Get-RestoreTaskParams $_ )
126117 Add-ProjectTask $_ clean (Get-CleanTaskParams $_ )
127118 Add-ProjectTask $_ test (Get-TestTaskParam $_ ) " $BuildRoot /tests"
128119}
129120
130121task build " engine/build" , " rules/build"
131- task restore " engine/restore" , " rules/restore"
132122task clean " engine/clean" , " rules/clean"
133123task test " engine/test" , " rules/test"
134124
Original file line number Diff line number Diff line change 11param (
2- # Automatically performs a 'dotnet restore' when being run the first time
32 [switch ]$Build ,
4- # Restore Projects in case NuGet packages have changed
5- [switch ]$Restore ,
63 [switch ]$Uninstall ,
74 [switch ]$Install ,
85
@@ -18,19 +15,6 @@ if ($Configuration -match "PSv3" -and $Framework -eq "netstandard1.6")
1815 throw (" {0} configuration is not applicable to {1} framework" -f $Configuration , $Framework )
1916}
2017
21- Function Test-DotNetRestore
22- {
23- param (
24- [string ] $projectPath
25- )
26- Test-Path ([System.IO.Path ]::Combine($projectPath , ' obj' , ' project.assets.json' ))
27- }
28-
29- function Invoke-RestoreSolution
30- {
31- dotnet restore (Join-Path $PSScriptRoot .\PSScriptAnalyzer.sln)
32- }
33-
3418Write-Progress " Building ScriptAnalyzer"
3519$solutionDir = Split-Path $MyInvocation.InvocationName
3620if (-not (Test-Path " $solutionDir /global.json" ))
@@ -56,28 +40,14 @@ elseif ($Configuration -match 'PSv3') {
5640 $destinationDirBinaries = " $destinationDir \PSv3"
5741}
5842
59- if ($Restore.IsPresent )
60- {
61- Invoke-RestoreSolution
62- }
63-
6443if ($build )
6544{
6645
6746 Write-Progress " Building Engine"
68- if (-not (Test-DotNetRestore ((Join-Path $solutionDir Engine))))
69- {
70- Invoke-RestoreSolution
71- }
7247 Push-Location Engine\
7348 dotnet build Engine.csproj -- framework $Framework -- configuration $Configuration
7449 Pop-Location
7550
76-
77- if (-not (Test-DotNetRestore ((Join-Path $solutionDir Rules))))
78- {
79- Invoke-RestoreSolution
80- }
8151 Write-Progress " Building for framework $Framework , configuration $Configuration "
8252 Push-Location Rules\
8353 dotnet build Rules.csproj -- framework $Framework -- configuration $Configuration
You can’t perform that action at this time.
0 commit comments