From e5a72bbef996474cdd98b8c1161878b76174dc0d Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Wed, 15 May 2013 21:55:15 -0700 Subject: [PATCH] added grunt to build powershell --- NzbDrone/NzbDrone.csproj | 2 -- build.ps1 | 15 ++++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/NzbDrone/NzbDrone.csproj b/NzbDrone/NzbDrone.csproj index 15e70a225..df782eb25 100644 --- a/NzbDrone/NzbDrone.csproj +++ b/NzbDrone/NzbDrone.csproj @@ -43,7 +43,6 @@ 4 true BasicCorrectnessRules.ruleset - C:\Users\Mark\AppData\Local\Temp\vs167E.tmp\x86\Debug\ x86 @@ -53,7 +52,6 @@ TRACE prompt 4 - C:\Users\Mark\AppData\Local\Temp\vs167E.tmp\x86\Release\ NzbDrone.ico diff --git a/build.ps1 b/build.ps1 index 749ee6dcf..a770a0a94 100644 --- a/build.ps1 +++ b/build.ps1 @@ -34,8 +34,9 @@ Function CleanFolder($path) get-childitem $path -File -Filter app.config | foreach ($_) {remove-item $_.fullname} Write-Host Removing Empty folders - while (Get-ChildItem $path -recurse | where {!@(Get-ChildItem -force $_.fullname)} | Test-Path) { - Get-ChildItem $path -recurse | where {!@(Get-ChildItem -force $_.fullname)} | Remove-Item + while (Get-ChildItem $path -recurse | where {!@(Get-ChildItem -force $_.fullname)} | Test-Path) + { + Get-ChildItem $path -Directory -recurse | where {!@(Get-ChildItem -force $_.fullname)} | Remove-Item } } @@ -73,13 +74,17 @@ Function Nunit() Invoke-Expression $nunitExe } -Function Grunt() +Function RunGrunt() { - grunt package + $npmInstall = 'npm install' + $gruntPackage = 'grunt package' + + Invoke-Expression $npmInstall + Invoke-Expression $gruntPackage } Build -Grunt +RunGrunt PackageTests if($runTests)