File tree 2 files changed +0
-40
lines changed 2 files changed +0
-40
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,6 @@ function Get-BuildTaskParams($project) {
78
78
$taskParams
79
79
}
80
80
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
-
89
81
function Get-CleanTaskParams ($project ) {
90
82
@ {
91
83
Jobs = {
@@ -122,13 +114,11 @@ popd
122
114
$projects = @ (" engine" , " rules" )
123
115
$projects | ForEach-Object {
124
116
Add-ProjectTask $_ build (Get-BuildTaskParams $_ )
125
- Add-ProjectTask $_ restore (Get-RestoreTaskParams $_ )
126
117
Add-ProjectTask $_ clean (Get-CleanTaskParams $_ )
127
118
Add-ProjectTask $_ test (Get-TestTaskParam $_ ) " $BuildRoot /tests"
128
119
}
129
120
130
121
task build " engine/build" , " rules/build"
131
- task restore " engine/restore" , " rules/restore"
132
122
task clean " engine/clean" , " rules/clean"
133
123
task test " engine/test" , " rules/test"
134
124
Original file line number Diff line number Diff line change 1
1
param (
2
- # Automatically performs a 'dotnet restore' when being run the first time
3
2
[switch ]$Build ,
4
- # Restore Projects in case NuGet packages have changed
5
- [switch ]$Restore ,
6
3
[switch ]$Uninstall ,
7
4
[switch ]$Install ,
8
5
@@ -18,19 +15,6 @@ if ($Configuration -match "PSv3" -and $Framework -eq "netstandard1.6")
18
15
throw (" {0} configuration is not applicable to {1} framework" -f $Configuration , $Framework )
19
16
}
20
17
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
-
34
18
Write-Progress " Building ScriptAnalyzer"
35
19
$solutionDir = Split-Path $MyInvocation.InvocationName
36
20
if (-not (Test-Path " $solutionDir /global.json" ))
@@ -56,28 +40,14 @@ elseif ($Configuration -match 'PSv3') {
56
40
$destinationDirBinaries = " $destinationDir \PSv3"
57
41
}
58
42
59
- if ($Restore.IsPresent )
60
- {
61
- Invoke-RestoreSolution
62
- }
63
-
64
43
if ($build )
65
44
{
66
45
67
46
Write-Progress " Building Engine"
68
- if (-not (Test-DotNetRestore ((Join-Path $solutionDir Engine))))
69
- {
70
- Invoke-RestoreSolution
71
- }
72
47
Push-Location Engine\
73
48
dotnet build Engine.csproj -- framework $Framework -- configuration $Configuration
74
49
Pop-Location
75
50
76
-
77
- if (-not (Test-DotNetRestore ((Join-Path $solutionDir Rules))))
78
- {
79
- Invoke-RestoreSolution
80
- }
81
51
Write-Progress " Building for framework $Framework , configuration $Configuration "
82
52
Push-Location Rules\
83
53
dotnet build Rules.csproj -- framework $Framework -- configuration $Configuration
You can’t perform that action at this time.
0 commit comments