mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2025-10-30 14:17:54 +00:00
[WIP] Validate manifests against JSON Schema in CI Tests (#1331)
* Add suggest and psmodule to schema.json * Fix required fields in schema.json * Improve url validation in schema.json * Add validator.exe as a single file validation tool * Add Scoop.Validator Lib for use in Manifest-Tests * Add buildscript for Scoop.Validator and validator.exe * Exclude .dll and packages folder from Project-Tests * Validate manifests against JSON Schema in CI Tests * Complete JSON Schema Validation * Dlls shouldn't be treated as text
This commit is contained in:
8
supporting/validator/build.ps1
Normal file
8
supporting/validator/build.ps1
Normal file
@@ -0,0 +1,8 @@
|
||||
$fwdir = gci C:\Windows\Microsoft.NET\Framework\ -dir | sort -desc | select -first 1
|
||||
|
||||
pushd $psscriptroot
|
||||
& nuget restore -solutiondirectory .
|
||||
gci $psscriptroot\packages\Newtonsoft.*\lib\net40\*.dll -file | % { copy-item $_ $psscriptroot }
|
||||
& "$($fwdir.fullname)\csc.exe" /platform:anycpu /nologo /optimize /target:library /reference:Newtonsoft.Json.dll,Newtonsoft.Json.Schema.dll Scoop.Validator.cs
|
||||
& "$($fwdir.fullname)\csc.exe" /platform:anycpu /nologo /optimize /target:exe /reference:Scoop.Validator.dll,Newtonsoft.Json.dll,Newtonsoft.Json.Schema.dll validator.cs
|
||||
popd
|
||||
Reference in New Issue
Block a user