Skip to content

Instantly share code, notes, and snippets.

@jacano
Created June 25, 2015 15:16
Show Gist options
  • Save jacano/0569fc80d3a82d358dad to your computer and use it in GitHub Desktop.
Save jacano/0569fc80d3a82d358dad to your computer and use it in GitHub Desktop.
module BuildHelpers
open Fake
open Fake.XamarinHelper
open System
open System.IO
open System.Linq
let Exec command args =
let result = Shell.Exec(command, args)
if result <> 0 then failwithf "%s exited with error %d" command result
let RestorePackages solutionFile =
Exec "tools/NuGet/NuGet.exe" ("restore " + solutionFile)
solutionFile |> RestoreComponents (fun defaults -> {defaults with ToolPath = "tools/xpkg/xamarin-component.exe" })
let RunNUnitTests dllPath xmlPath =
Exec "tools/NUnit/nunit-console" (dllPath + " -xml=" + xmlPath)
TeamCityHelper.sendTeamCityNUnitImport xmlPath
let GetBuildCounter (str:Option<string>) =
match str with
| Some(v) -> v
| None -> "Local"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment