From d502f3d57e9f01c00f38f9e3712ee017b66d1928 Mon Sep 17 00:00:00 2001 From: Bryan Date: Fri, 11 Dec 2015 14:05:32 -0800 Subject: [PATCH] Add Project Validation to build scripts. Fail on a failed analysis. --- scripts/compile.ps1 | 8 ++++++++ scripts/compile.sh | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/scripts/compile.ps1 b/scripts/compile.ps1 index af843eeff..e3e73336c 100644 --- a/scripts/compile.ps1 +++ b/scripts/compile.ps1 @@ -146,6 +146,14 @@ Download it from https://www.cmake.org Exit 1 } + # Run Validation for Project.json dependencies + dotnet publish $RepoRoot\tools\MultiProjectValidator -o $Stage2Dir\..\tools + & "$Stage2Dir\..\tools\pjvalidate" "$RepoRoot\src" + if (!$?) { + Write-Host "Project Validation Failed" + Exit 1 + } + } finally { $env:PATH = $StartPath $env:DOTNET_HOME = $StartDotNetHome diff --git a/scripts/compile.sh b/scripts/compile.sh index f0e13742e..82ee86d08 100755 --- a/scripts/compile.sh +++ b/scripts/compile.sh @@ -118,3 +118,7 @@ DOTNET_HOME=$STAGE2_DIR DOTNET_TOOLS=$STAGE2_DIR $DIR/test/smoke-test.sh # E2E test on the output header "Testing stage2 End to End ..." DOTNET_HOME=$STAGE2_DIR DOTNET_TOOLS=$STAGE2_DIR $DIR/test/e2e-test.sh + +# Run Validation for Project.json dependencies +dotnet publish "$REPOROOT/tools/MultiProjectValidator" -o "$OUTPUT_DIR/../tools" +"$OUTPUT_DIR/tools/pjvalidate" "$REPOROOT/src"