|
1 | 1 | Param([Switch]$Fast)
|
2 |
| -Push-Location $psscriptroot |
3 |
| -. "$psscriptroot\..\..\lib\install.ps1" |
| 2 | +Push-Location $PSScriptRoot |
| 3 | +. "$PSScriptRoot\..\..\lib\install.ps1" |
4 | 4 |
|
5 |
| -if(!$Fast) { |
| 5 | +if (!$Fast) { |
6 | 6 | Write-Host "Install dependencies ..."
|
7 |
| - Invoke-Expression "$psscriptroot\install.ps1" |
| 7 | + Invoke-Expression "$PSScriptRoot\install.ps1" |
8 | 8 | }
|
9 | 9 |
|
10 |
| -$output = "$psscriptroot\bin" |
11 |
| -if(!$Fast) { |
12 |
| - Get-ChildItem "$psscriptroot\packages\Newtonsoft.*\lib\net45\*.dll" -File | ForEach-Object { Copy-Item $_ $output } |
| 10 | +$output = "$PSScriptRoot\bin" |
| 11 | +if (!$Fast) { |
| 12 | + Get-ChildItem "$PSScriptRoot\packages\Newtonsoft.*\lib\net45\*.dll" -File | ForEach-Object { Copy-Item $_ $output } |
13 | 13 | }
|
14 | 14 | Write-Output 'Compiling Scoop.Validator.cs ...'
|
15 |
| -& "$psscriptroot\packages\Microsoft.Net.Compilers\tools\csc.exe" /deterministic /platform:anycpu /nologo /optimize /target:library /reference:"$output\Newtonsoft.Json.dll","$output\Newtonsoft.Json.Schema.dll" /out:"$output\Scoop.Validator.dll" Scoop.Validator.cs |
| 15 | +& "$PSScriptRoot\packages\Microsoft.Net.Compilers.Toolset\tasks\net472\csc.exe" -deterministic -platform:anycpu -nologo -optimize -target:library -reference:"$output\Newtonsoft.Json.dll" -reference:"$output\Newtonsoft.Json.Schema.dll" -out:"$output\Scoop.Validator.dll" Scoop.Validator.cs |
16 | 16 | Write-Output 'Compiling validator.cs ...'
|
17 |
| -& "$psscriptroot\packages\Microsoft.Net.Compilers\tools\csc.exe" /deterministic /platform:anycpu /nologo /optimize /target:exe /reference:"$output\Scoop.Validator.dll","$output\Newtonsoft.Json.dll","$output\Newtonsoft.Json.Schema.dll" /out:"$output\validator.exe" validator.cs |
| 17 | +& "$PSScriptRoot\packages\Microsoft.Net.Compilers.Toolset\tasks\net472\csc.exe" -deterministic -platform:anycpu -nologo -optimize -target:exe -reference:"$output\Scoop.Validator.dll" -reference:"$output\Newtonsoft.Json.dll" -reference:"$output\Newtonsoft.Json.Schema.dll" -out:"$output\validator.exe" validator.cs |
18 | 18 |
|
19 | 19 | Write-Output 'Computing checksums ...'
|
20 |
| -Remove-Item "$psscriptroot\bin\checksum.sha256" -ErrorAction Ignore |
21 |
| -Remove-Item "$psscriptroot\bin\checksum.sha512" -ErrorAction Ignore |
22 |
| -Get-ChildItem "$psscriptroot\bin\*" -Include *.exe,*.dll | ForEach-Object { |
23 |
| - "$(compute_hash $_ 'sha256') *$($_.Name)" | Out-File "$psscriptroot\bin\checksum.sha256" -Append -Encoding oem |
24 |
| - "$(compute_hash $_ 'sha512') *$($_.Name)" | Out-File "$psscriptroot\bin\checksum.sha512" -Append -Encoding oem |
| 20 | +Remove-Item "$PSScriptRoot\bin\checksum.sha256" -ErrorAction Ignore |
| 21 | +Remove-Item "$PSScriptRoot\bin\checksum.sha512" -ErrorAction Ignore |
| 22 | +Get-ChildItem "$PSScriptRoot\bin\*" -Include *.exe, *.dll | ForEach-Object { |
| 23 | + "$(compute_hash $_ 'sha256') *$($_.Name)" | Out-File "$PSScriptRoot\bin\checksum.sha256" -Append -Encoding oem |
| 24 | + "$(compute_hash $_ 'sha512') *$($_.Name)" | Out-File "$PSScriptRoot\bin\checksum.sha512" -Append -Encoding oem |
25 | 25 | }
|
26 | 26 | Pop-Location
|
0 commit comments