Skip to content

Commit

Permalink
Removong the windows phone compile step from the main build script, s…
Browse files Browse the repository at this point in the history
…o it can live in its own script.
  • Loading branch information
mduncan26 committed Jun 12, 2018
1 parent 093628c commit 62fdcf7
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
9 changes: 2 additions & 7 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ properties {
$solution_file_webjob = "$root/Mindscape.Raygun4Net.Azure.WebJob.sln"
$solution_file_webapi = "$root/Mindscape.Raygun4Net.WebApi.sln"
$solution_file_winrt = "$root/Mindscape.Raygun4Net.WinRT.sln"
$solution_file_windows_phone = "$root/Mindscape.Raygun4Net.WindowsPhone.sln"
$configuration = "Release"
$build_dir = "$root\build\"
$build_dir_client_profile = "$build_dir\Net3.ClientProfile"
Expand All @@ -25,7 +24,7 @@ properties {
$env:Path += ";$nunit_dir;$tools_dir;$nuget_dir"
}

task default -depends Compile, CompileWinRT, CompileWindowsPhone
task default -depends Compile, CompileWinRT

task Clean {
remove-item -force -recurse $build_dir -ErrorAction SilentlyContinue | Out-Null
Expand Down Expand Up @@ -57,11 +56,7 @@ task CompileWinRT -depends Init {
remove-item -force -recurse $build_dir/Mindscape.Raygun4Net.WinRT.Tests -ErrorAction SilentlyContinue | Out-Null
}

task CompileWindowsPhone -depends Init {
exec { msbuild "$solution_file_windows_phone" /m /p:OutDir=$build_dir /p:Configuration=$Configuration }
}

task Test -depends Compile, CompileWinRT, CompileWindowsPhone, CompileWindowsStore {
task Test -depends Compile, CompileWinRT {
$test_assemblies = Get-ChildItem $build_dir -Include *Tests.dll -Name

Push-Location -Path $build_dir
Expand Down
4 changes: 4 additions & 0 deletions buildWindowsPhone.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set EnableNuGetPackageRestore=true
call .\packages\psake.4.3.2\tools\psake.cmd buildWindowsPhone.ps1 %*

pause
34 changes: 34 additions & 0 deletions buildWindowsPhone.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
properties {
$root = $psake.build_script_dir
$solution_file = "$root/Mindscape.Raygun4Net.WindowsPhone.sln"
$configuration = "Release"
$build_dir = "$root\build\WindowsPhone\"
$nunit_dir = "$root\packages\NUnit.Runners.2.6.2\tools\"
$tools_dir = "$root\tools"
$nuget_dir = "$root\.nuget"
$env:Path += ";$nunit_dir;$tools_dir;$nuget_dir"
}

task default -depends Compile

task Clean {
remove-item -force -recurse $build_dir -ErrorAction SilentlyContinue | Out-Null
}

task Init -depends Clean {
new-item $build_dir -itemType directory | Out-Null
}

task Compile -depends Init {
exec { msbuild "$solution_file" /m /p:OutDir=$build_dir /p:Configuration=$Configuration }
}

task Test -depends Compile {
$test_assemblies = Get-ChildItem $build_dir -Include *Tests.dll -Name

Push-Location -Path $build_dir

exec { nunit-console.exe $test_assemblies }

Pop-Location
}

0 comments on commit 62fdcf7

Please sign in to comment.